martes, 4 de septiembre de 2007

Reporte Práctica2.

1. Escriba u programa en el cual:
- Se dibuja un cuadrado.

void cuad() {
glBegin(GL_POLYGON);

glVertex3f(0.6,0.6,0.6);
glVertex3f(-0.6,0.,0.6);
glVertex3f(-0.6,-0.6,0.6);
glVertex3f(0.6,-0.6,0.6);

- Utilizando las llamadas al cuadrado y aplicando rotaciones y transformaciones, dibuje un cubo.

cuad();
glRotatef(30.0,1.0,0.0,0.0);
glTranslatef(0.5,0.5,-0.5);
glScalef(2.0,0.5,1.0);

Se aplican más transformaciones para obtener el cubo.

No hay comentarios: