Thursday, November 15, 2007

Week 4

Week 4

Question 1

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glOrtho(-6.4,0,-4.8,0,1,50);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluLookAt(4,4,4,0,1,0,0,1,0);

Question 2

800X600 screen size

Question 3

n =( 4 ,3 ,4 )
u =( 4 ,0 ,-4 )
v =( 12,32,-12)

Question 4

n =( 4 ,3 ,4 )
u =( -4,8 ,-2 )
v =( 38,-8,-44)

Question 5

MODEL VIEW matrix allows the virtual camera to look at the model.
PROJECTION matrix allows the screen to look from the camera point of view.

Question 6

glClear();

Question 7

gluLookAt();

Question 8

gluLookAt ( eyeX , eyeY , eyeZ , centerX , centerY , centerZ , upX , upY , upZ )

Parameters
eyeX, eyeY, eyeZ
Specifies the position of the eye point.

centerX, centerY, centerZ
Specifies the position of the reference point.

upX, upY, upZ
Specifies the direction of the up vector.


Question 9

The red triangle is behind the green triangle.

Question 10

The green triangle is too far away to be seen.

Click here to download Week 4 glut file.

No comments: