PDA

View Full Version : drawing ellipsoid



11-09-2003, 01:48 PM
I am having trouble drawing an ellipsoid. I can get a sphere. Does any one have any hints on an easy way to put an ellipsoid in my project?

Coconut
11-10-2003, 06:37 AM
glScalef

cg-hci_novice
11-10-2003, 06:37 AM
line loop is the easiest I have seen so far - there is a formula (algorithm) for a circle in the red book - I believe there is a copy of it online.

Good luck.

11-10-2003, 07:43 AM
How are you getting the sphere? Canned routine, or plotting the surface vertices yourself?

If you're doing it yourself (say, by plotting x and y, where z varies by pi to 2*pi), then simply scale your x, y and z by a dividend to get an ellipsoid, no?

See Paul Bourke's article (http://astronomy.swin.edu.au/~pbourke/geometry/quadric/) for more details.

If you're still stuck, squeal a reply here and I'll drag out some OpenGL code.