View Full Version : How to draw an ellipsoid with arbitrary axes?

dolphinmark

11-10-2003, 05:34 PM

Hi,

I'm new to Opengl. Now I have a problem. I dont know how to draw an ellipsoid with arbitrary axes. Now I know three vectors indicating three directions of the axes of the ellipsoid. I also know the lengths of each axes and the center of the ellipsoid. How can I draw such an ellipsoid?

Thank you very much!

--dolphin mark

gator

11-10-2003, 06:25 PM

Does GLU draw quadratics or this kind of stuff? I know it does torus, sphere, etc...

To draw any surface you can think of, all you need are the x,y,z parametric equations

that describe it. So, do a search for them.

[This message has been edited by gator (edited 11-10-2003).]

dolphinmark

11-10-2003, 06:32 PM

I think I can draw a sphere first. Then translate, rotate and scale it to an ellipsoid. But I don't know how to rotate three axes of the current coordinate to arbitrary three orthogonal axes.

Can anyone help me?

Thanks a lot!

gator

11-10-2003, 08:40 PM

I think you need to lookup matrix transformations. If it's an orthogonal matrix, the

columns or rows of matrix should contain the x,y,z axis system. You can use this bit of

info to create a specific local to world matrix transformation.

Then after getting your matrix, it's a matter of multiplying every vertex by it.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.