Ellipsoid. How?

Hi

I want to make an Ellipsoid using triangle primitives but i dont know how. Does anyone know where can i find the solution please?.

Now I have made it using a glSphere and Scaling it by (xLong,yLong,zLong) where xLong, yLong and zLong are the three axis length of the ellipsoid (They can be different) but the light effects dissapear and it looks poor.

What can I do?. Thanks

Lighting won’t work any more because the normals are scaled too and become non-unit normals. If you want the lighting to work, you could try glEnable(GL_NORMALIZE);

Hope that helps.

Good idea, but GL_NORMALIZE is very slow. If you want something faster, draw your ellipsoid yourself. To achieve this, decompose it in horizontal slices. Each slice could be drawn as a gluCylinder with Radius1 different form Radius2. Of course it would be fastest if you drew everything yourself with a vertex array…but it would be more complicated, too.

Hope that helps
Morglum

Thakyou.

I used the aproach propossed by ffish because it works fine and I did not understand the cylinders one :-).

Bye and thanks again