PDA

View Full Version : Drawing a simple circle



siuchick
02-10-2002, 08:18 AM
How to draw a simple circle with filled color?
In my program, there are a triangle and a rectangle. I tried so many reference..but still can't draw a circle...

Pls. help.

cheers,
siuchick

Mr_Smith
02-10-2002, 12:47 PM
theres probably an easy way but you could use simple trig and a filled polygon.
x=sin(t)
y=cos(t)
should draw a portion then changing the sign +/- of x and y will get hte rest of a circle and just use these points for your filled polygon, ive never tried it in opengl but should easily work.
or
you could just use a quadratic disc, more setting up but easyer once set up, if yr not to sure on drawing circles with trig.

john
02-11-2002, 01:27 PM
this topic has already been discussed to death. do a search on the forums

Mr_Smith
02-13-2002, 07:35 AM
WOW, i never realised so many peops had troub with circles http://www.opengl.org/discussion_boards/ubb/smile.gif