Advertisement

circle

Started by April 05, 2002 09:31 PM
2 comments, last by phantom007 22 years, 10 months ago
I know this is how you do a square -> glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(-bl, -bh, 0.15f); glTexCoord2f(1.0f, 0.0f); glVertex3f(bl, -bh, 0.15f); glTexCoord2f(1.0f, 1.0f); glVertex3f(bl, bh, 0.15f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-bl, bh, 0.15f); glEnd(); //bl and bh are length and height variables but how do you do a circle? A strategy sports game that can turn into open warfare ''Bloody Football'' - www.koalacomics.com.au/bloody
www.koalacomics.com.au for a humour comic
www.lobag.com for my fantasy RPG PBBG
www.testcricketmanager.com for my sports management game
sphere or circle?

sphere:

    auxSolidSphere(diameter);    

circle:
I have no clue, but if i had to make a circle...
Create some algorythm to draw 360 lines. That would serve my needs good enough.

[edit] I AM THE MOST INEFFECIANT PERSON IN THE WORLD. Im sure there is some easy command.

[edited by - DarkHunter on April 5, 2002 12:39:19 AM]

Advertisement
for a circle you can make a loop from 0 to 2*PI.
for the x value you take cos(loop_var) and for the y value you take sin(loop_var)
I was after a circle but now that I have thought about it I can''t see why I can''t use a sphere. I''ll just check to see how much memeory it requires first

A strategy sports game that can turn into open warfare
''Bloody Football'' - www.koalacomics.com.au/bloody
www.koalacomics.com.au for a humour comic
www.lobag.com for my fantasy RPG PBBG
www.testcricketmanager.com for my sports management game

This topic is closed to new replies.

Advertisement