Dibujar circunferencia en opengl
Publicado por David (1 intervención) el 28/10/2006 13:12:23
HOla me gustaria saber como puedo dibujar una circunferencia, pasandole yo los datos.
GRacias
GRacias
Valora esta pregunta


0
void graficaSeno(){
float x;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-4,4,-1.5,1.5);
glViewport(0,altoV/2,anchoV/2,altoV/2);
glColor3ub(200,0,255);
glBegin(GL_LINES);
glVertex2f(0,-1.2);
glVertex2f(0,1.2);
glVertex2f(-3.5,0);
glVertex2f(3.5,0);
glEnd();
glColor3ub(0,0,255);
glBegin(GL_LINE_STRIP);
for(x=-PI;x<=PI;x+=0.01){
glVertex2f(x,sin(x));
}
glEnd();
}