Jump to content
  • Advertisement


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


How to create a sphere?

This topic is 5754 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

Red Book page 88,

Links to code from red book ftp://sgigate.sgi.com/pub/opengl/opengl12.zip

or try sgi.com and search for code.

Or another method would be to draw circle at different angles

Here some code off my head.

z = 0;

for (radian = 0; radian > PI*2; radian = radian + PI /180){

x = sin(radian) * centerx;
y = cos(radian) * centerY;
glVertex3fv( x, y, z);


use glRotate after each circle to rotate and at Z angle.

I would stick to the red book if I was you.

[edited by - jlebrech on October 21, 2002 2:24:54 PM]

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!