Archived

This topic is now archived and is closed to further replies.

Sphere

This topic is 5710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hiho, how to draw a Sphere in OpenGl without(!) GLUT, just with some for or while loops? Thx4answer _________________ void signatur();

Share this post


Link to post
Share on other sites
Look into the glu quadrics like gluSphere, gluCylinder, etc...

Share this post


Link to post
Share on other sites
Try fooling around with sin() and cos() in a for statement. I can''t remember exactly how to do it, but it shouldnt be that hard to figure out on your own. The only hard part is connecting all the vertices together correctly

Share this post


Link to post
Share on other sites
you can calculate points on sphere with:

x = radius*sin(a)*sin(b)
y = radius*cos(a)*sin(b)
z = radius*cos(b)

a [0..2PI]
b [-PI/2..PI/2]

then just connect the dots..


You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites