Anybodu knows how to draw a sphere in borland c++
no opengl business
Anybodu knows how to draw a sphere in borland c++
no opengl business
AbHHinaay
simple trig
1. you need the points of a circle......
2. then you need to rotate the circle in stages, making polygons with each rotation.
3. draw polygons
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
if this is for a game or any other type of real-time graphics system then I suggest generating trig tables for these purposes. This allows fast generation of things that require sin,cos calls
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
0<alpha<360
-90<beta<90
newx=centerx+((cos(alpha)*cos(beta))*radius)
newy=centery+((cos(alpha)*sin(beta))*radius)
newz=centerz+((sin(alpha))*radius)