Page 1 of 2
3D drawing of circles/spheres
Posted: Mon Oct 13, 2008 3:00 pm
by 9235719
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.
Posted: Mon Oct 13, 2008 3:10 pm
by narcis
Hi Mike,
You can try either setting 3D view to false or changing Chart3DPercent:
Code: Select all
Chart1.View3D:=false;
Chart1.Chart3DPercent:=1;
Spheres/Circles
Posted: Tue Oct 14, 2008 7:57 am
by 9235719
I have tried that, and it is better but still does not eliminate perspective in OpenGL
Posted: Tue Oct 14, 2008 9:07 am
by narcis
Hi Mike,
Have you tried setting Elevation to 360?
Posted: Tue Oct 14, 2008 9:14 am
by 9235719
Yes. But this still does not eliminate perspective.
Posted: Tue Oct 14, 2008 9:18 am
by narcis
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.
Posted: Tue Oct 14, 2008 9:39 am
by 9235719
I have sent image via upload page
Posted: Tue Oct 14, 2008 9:43 am
by narcis
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;
Posted: Tue Oct 14, 2008 10:21 am
by 9235719
Hi
No, still same problem.
Posted: Tue Oct 14, 2008 10:35 am
by 9235719
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.
Posted: Tue Oct 14, 2008 10:42 am
by narcis
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.
Posted: Tue Oct 14, 2008 12:38 pm
by 9235719
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
Posted: Tue Oct 14, 2008 1:09 pm
by narcis
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.
Posted: Tue Oct 14, 2008 1:19 pm
by narcis
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.
Posted: Tue Oct 14, 2008 2:27 pm
by 9235719
Hi Narcis
Not quite. As soon as you try to rotate using the left mouse button the perspective reappears.
Mike