PDA

View Full Version : Sphere with triangle strips



instruo
12-05-2003, 02:17 PM
Hi there,

I'm working on a sphere generator and I pretty well have it generating all of my points (still throwing a few strange values, but on the whole its working fine http://www.opengl.org/discussion_boards/ubb/wink.gif Anyway, I'm curious if there's any way to make the sphere out of a single strip? I've found a way to do it by 'peeling' going around the sphere around the Y-axis. The problem with this approach has been that it creates a straight lined polygon as I move down a 'tier' after I've completed the current one. ANY input about this, or the best way to build a sphere, would be greatly appreciated. Thanks!

mikael_aronsson
12-05-2003, 11:22 PM
Most spheres are generated by two triangle fans for the end "caps" and then a number of strips, trying to do the hole thing with one strip is a bit tricky I think.

If you need nicer looking spheres the Graphics Gems books sample code has code for one that use a simple primitive that is refined to the correct resolution and look's very nice.

But there are many ways to do a sphere.

Mikael

instruo
12-06-2003, 07:14 AM
I suppose I should have made the part about the caps clear, I was already planning on doing fans there http://www.opengl.org/discussion_boards/ubb/wink.gif Thanks for the reply, I'll have to check that out!

Brian