Circles?
How would someone draw circles/spheres using OpenGL? I don''t want to use the auxSolidSphere(); it doesn''t work well when switching back and forth form fullscreen/windowed mode. Would you have to draw 360 triangles all with the same common vertex at the center of the circle? Or is there some other circle drawing function in another library that works better?
How do you draw circles without the glaux library?
Any help would be greatly appreciate. THANK YOU!
quote:
Original post by Viscous-Flow
Would you have to draw 360 triangles all with the same common vertex at the center of the circle?
If you did that, make sure it''s a triangle fan (and you wouldn''t need 360). You could just dynamically create a texture, then use it on a quad.
[Resist Windows XP''s Invasive Production Activation Technology!]
Well, let me take an example in what I tried to make..
I wanted a ball or something to move around in a circle and all the way around again..
I came up with this formula for the trajectory:
Ball.x = center + sin((a*PI/180)*Radius))
Ball.y = center + cos((a*PI/180)*Radius))
a+=1;
if (a > 360)
a = 0;
The code is pretty self explaiary I think.. Tell me if this give you any clue about what you're trying to do.
Kenneth Wilhelmsen
Download my little game project HERE
--------------------------
He who joyfully marches to music in rank and file has already earned my contempt. He has
been given a large brain by mistake, since for him the spinal cord would fully suffice. This
disgrace to civilization should be done away with at once. Heroism at command, senseless
brutality, deplorable love-of-country stance, how violently I hate all this, how despicable and ignoble war is; I would rather be torn to shreds than be a part of so base an action! It is my conviction that killing under the cloak of war is nothing but an act of murder
Edited by - kenwi on August 30, 2001 9:01:58 AM
I wanted a ball or something to move around in a circle and all the way around again..
I came up with this formula for the trajectory:
Ball.x = center + sin((a*PI/180)*Radius))
Ball.y = center + cos((a*PI/180)*Radius))
a+=1;
if (a > 360)
a = 0;
The code is pretty self explaiary I think.. Tell me if this give you any clue about what you're trying to do.
Kenneth Wilhelmsen
Download my little game project HERE
--------------------------
He who joyfully marches to music in rank and file has already earned my contempt. He has
been given a large brain by mistake, since for him the spinal cord would fully suffice. This
disgrace to civilization should be done away with at once. Heroism at command, senseless
brutality, deplorable love-of-country stance, how violently I hate all this, how despicable and ignoble war is; I would rather be torn to shreds than be a part of so base an action! It is my conviction that killing under the cloak of war is nothing but an act of murder
Edited by - kenwi on August 30, 2001 9:01:58 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement