View Full Version : circles in openGL c++

02-01-2004, 12:11 PM

I'm working on an openGL program for a beginner level graphics course that I'm taking in university. And our program is to create a robot that swings it's arms in 360 degrees...and the structure should be built using a kinetic tree http://www.opengl.org/discussion_boards/ubb/frown.gif (haven't gotten there yet)

But what my question is..how do i draw a cirle in openGL?

if anyone can help me with this it will be greately appreciated. thanks in advance


02-01-2004, 01:24 PM
use sin and cos in conjunction with a line loop

02-01-2004, 06:54 PM
That works, or if you're just concerned with tracing out a circle and not actually drawing it, glRotatef() should work.

02-02-2004, 06:15 AM
Or you could load a circle graphic and texture it onto a quad.

I'm guessing you're after a 2D, side-projection, wireframe model of a robot with, say, a two jointed arm? In which case you'll want to use the line loop to draw the arms and joints, calling glRotatef to angle the arm at each joint.

02-02-2004, 05:02 PM
or use the glu comand for a disk then make the hole in the middle really big