PDA

View Full Version : OpenGL query



04-11-2003, 02:25 AM
What are ways or methods to draw circular or curved shapes using OpenGL?

Deiussum
04-11-2003, 04:23 AM
You sub-divide things enough to get the level of "roundness" you want. OpenGL does have things like the glMap functions for doing bezier curves and sufaces, but again they are only as round as the number of steps you use to display them.

As an example, you could look at glutSolidSphere or gluSphere. Start out with only a few slices and stacks. As you increase the number of slices and stacks, eventually the sphere will be more and more like a real sphere to the point where it's close enough.

147-2
04-11-2003, 07:41 AM
I believe even the NURBS utilities in the glu lib and OpenGL evaluators do that.