Hi, I'm having a bit of trouble making a good, nice, round, filled 2D circle in OpenGL. I use GNU C compiler, CodeBlocks IDE and Windows XP. The following code produces an ellipse that looks more like a "tomato" in the sense that it is wide for how tall it is. So the problem is, how to "thin it out" in the middle to make it more round like an actual circle.
float x1,y1,x2,y2;
float angle;
double radius=0.1;
x1 = 0.5,y1=0.6;
glColor3f(1.0,1.0,0.6);
glBegin(GL_TRIANGLE_FAN);
glVertex2f(x1,y1);
for (angle=1.0f;angle<361.0f;angle+=0.2)
{
x2 = x1+sin(angle)*radius;
y2 = y1+cos(angle)*radius;
glVertex2f(x2,y2);
}
glEnd();