The purpose of the lab session is very simple:
You should work through the following stages.
If your machine isn't already running Linux, re-boot it to do so and log in.
With a paper and pencil, work out the positions of the vertices of a cube of side 1 unit, and then work out the coordinates of the six squares that define the cube.
Write an OpenGL program that displays the six polygons using calls to glVertex3f etc. You are welcome to take one of the example programs reviewed in lectures as your starting point.
Make your program use the mouse to rotate the viewpoint. Pressing the mouse button and dragging the mouse to the left or right should rotate it in the x-z plane, while dragging up and down should rotate in the y-z plane. If you feel keen, you can also use the arrow keys on the keypad to control zoom.
© Adrian F. Clark 2010-11