DUE: Wednesday, 29 January, 12:00 noon
Create a 3D world and move around in it.
- Create an interesting 3D world. You can use GLUT spheres, cubes,
or anything else that you already know how to draw.
A red sphere with radius 2.0 can be drawn like this:
glColor3f(1.0, 0.0, 0.0);
glutSolidSphere(2.0, 8, 8);
A green cube 3.0 units on a side can be drawn like this:
glColor3f(0.0, 1.0, 0.0);
- Use hierarchical transformations to place the objects in your scene.
There must be at least one level of hierarchy.
For example, position a cube somewhere other than the origin, then position
some spheres relative to the cube.
- Figure out how to move the camera around using glTranslatef() and
- Move the camera under keyboard control. At a minimum, you should
be able to pan left and right, and dolly in and out.
Try to be add rotation about Y as well - make sure this rotates around the
camera's Y axis, not the world Y axis.
- At least some of the world should be visible from the default viewing
position when the program starts. But, not everything has to be visible
at once, if we can move the camera around to see it all.
- Tar up your program and deposit it in /home/dms/dave/424/in/02/.
just in a different directory.)