Drawing sphere with PSPGL?
Drawing sphere with PSPGL?
Hi! Do you know if it's possible to draw a sphere using PSPGL?? gluSphere is not implemented,and I don't have any idea how to draw it manually - if you have any ideas please share.Thanks :D
You google for "opengl examples sphere". :)
Here's a page with some examples showing how to draw a sphere using just triangles in opengl: http://www.sulaco.co.za/tut.htm
You'll notice that it starts by drawing an icosahedron with 20 triangles. Doesn't look very sphere-like. Then they show how to subdivide those triangles to make a much nicer looking sphere (example 2.7). Then finally a recursive subdividing example for a much nicer sphere (ex 2.8).
It's not C, but it's easy enough to follow what they're doing. There are other example pages you'll find in the search, but that was the first I noticed with a pretty simple sphere-via-triangles example.
Here's a page with some examples showing how to draw a sphere using just triangles in opengl: http://www.sulaco.co.za/tut.htm
You'll notice that it starts by drawing an icosahedron with 20 triangles. Doesn't look very sphere-like. Then they show how to subdivide those triangles to make a much nicer looking sphere (example 2.7). Then finally a recursive subdividing example for a much nicer sphere (ex 2.8).
It's not C, but it's easy enough to follow what they're doing. There are other example pages you'll find in the search, but that was the first I noticed with a pretty simple sphere-via-triangles example.