Jump to content
  • Advertisement

Archived

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

Striker47

Sphere

This topic is 5957 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!