PDA

View Full Version : how to draw circle



10-08-2002, 12:57 AM
soorryyy...i'm a new one in opengl...so can help me...please give me the coding if i want to create a circle...because i try but can't get it....


tq

fringe
10-08-2002, 01:55 AM
This question has been asked before and well answered try searching for the topic.
Anyway the way to do it is to draw many lines at the correct positions, if you make them small enough it looks like a circle. Each line can be drawn in a loop. The loop gives you the angle at which the next point is draw. Then use x= x position of center + x cos (the angle) and y = yposition of centre + y cos (the angle),

Hope this is helpful,

fringe