Render a trimmed sphere ? (a quarter of sphere)

Hi everybody!

As you know, in the GLU Library to render a complete sphere we use the command below

void gluSphere(GLUQuadricObj *obj, GLdouble radius, GLint slices, GLint stacks);

But I want to render a trimmed piece of sphere, such as a quarter of sphere. What do I have to do?.

a more thing that, I want to render a sphere drawn with triangle strips, not quad strips like the above command. How do I have to do ?

Please, help me. Thank you very much :eek:

One way I could think of is setting user clip planes and then drawing the sphere with the above method.

But you say you want triangle strips. There is no way around writing your own function to do that. You have to calculate the correct vertex coordinates on the sphere and connect the correct vertices to form triangles.

[ www.trenki.net | vector_math (3d math library) | software renderer ]