3D drawing of circles/spheres

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

3D drawing of circles/spheres

Post by Mike Glazer » Mon Oct 13, 2008 3:00 pm

I have trying to draw a 3D lattice of spheres on a 3D Chart. If I use the circle point I do not get any depth (although I do if I use triangles etc). I read somewhere here that one can use OpenGL by using

TeeOpenGL1.TeePanel := Chart1; //associate the component to your chart
TeeOpenGL1.Active := True; //activate the component

I tried that and for sure we do get spheres. However, I want to turn off any perspective. Even setting the perspective to zero still seems to produce some perspective.

I can successfully turn of the perspective using the normal circle points (i.e. not OpenGL), but then I dont get the solid spheres.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 13, 2008 3:10 pm

Hi Mike,

You can try either setting 3D view to false or changing Chart3DPercent:

Code: Select all

  Chart1.View3D:=false;
  Chart1.Chart3DPercent:=1;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Spheres/Circles

Post by Mike Glazer » Tue Oct 14, 2008 7:57 am

I have tried that, and it is better but still does not eliminate perspective in OpenGL

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 9:07 am

Hi Mike,

Have you tried setting Elevation to 360?

Code: Select all

  Chart1.Aspect.Elevation:=360;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 9:14 am

Yes. But this still does not eliminate perspective.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 9:18 am

Hi Mike,

Could you please send us an image of what you get an let us know what would you exactly like to eliminate?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 9:39 am

I have sent image via upload page

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 9:43 am

Hi Mike,

Thanks for the image. What about using this?

Code: Select all

  Chart1.Aspect.Zoom:=40;
  Chart1.Aspect.Elevation:=360;
  Chart1.Chart3DPercent:=1;
  Chart1.Aspect.Perspective:=0;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 10:21 am

Hi
No, still same problem.

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 10:35 am

I have uploaded the actual program for you to see. I imagine I have done something stupid!!! This program is in an early stage of development.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 10:42 am

Hi Mike,

Thanks for sending your project. Could you please let me know the exact steps we should follow to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 12:38 pm

Hi Narcis
If you just run the exe and hit the button you will see an array of red filled circles forming a lattice. However, you will also see that they still show perspective (i.e. the ones behind are displaced to give a sense of distance). You can rotate the lattice also by using the left mouse.

The unit1.pas contains the code.
regards
Mike

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 1:09 pm

Hi Mike,

Sorry, I had openned the SDIAPP.dpr project instead of twin.dpr. Now I can reproduce the issue here. We'll investigate it and will get back to you ASAP.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 14, 2008 1:19 pm

Hi Mike,

Using your project, at the PlotLattice method, uncommenting View3D:=false; line produces a chart with no perspective. Is that what you are looking for?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike Glazer
Newbie
Newbie
Posts: 13
Joined: Mon Jan 24, 2005 5:00 am
Location: Oxford
Contact:

Post by Mike Glazer » Tue Oct 14, 2008 2:27 pm

Hi Narcis
Not quite. As soon as you try to rotate using the left mouse button the perspective reappears.
Mike

Post Reply