| View previous topic :: View next topic |
| Author |
Message |
gambiting
Joined: 17 Aug 2006 Posts: 154
|
Posted: Tue Mar 04, 2008 3:19 am Post subject: 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 |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Tue Mar 04, 2008 9:02 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|