Computer Science 155: Graphics
Fall 2000
Homework 5
This assignment is due by midnight Friday, October 27.
In this assignment you will implement an OpenGL robot that can be
controlled by the user. This assignment is loads of fun!
Below are the list of requirements for this assignment:
- The robot should have a body, a head, and a right arm.
Left arm and other body parts are optional. Be creative!
- The robot's position should be user controllable via
the keyboard or mouse.
- The right arm should be user controllable via the keyboard
or mouse. In particular, the user must be able to rotate
the arm (about at least one vector) at the shoulder, elbow, and wrist.
Use hierarchical coordinate systems as described in class. Clearly
comment the section of code that builds the robot including the words
BUILD ROBOT. We will want to check that this is done correctly.
- The robot's head must be user controllable via the keyboard
or mouse. The head should be able to rotate left, right, up, and down.
- You should use a lighting model with ambient, diffuse, and
specular lights and materials.
- There should be one fixed light source as well as one spotlight
mounted on top of the robot's head. The spotlight should rotate
and move with the head. The fixed light source should provide
enough light so that the entire scene is visible (even if it's dim)
without the robot's spotlight. The spotlight will be used to
provide additional illumination in the direction in which the
robot is looking.
- The robot should live in a 3D space with a shiny floor and at
least a few 3D objects in it so that the robot can be moved
around the scene and shine its spotlight on the various objects.
Make sure to partition the floor into a number of separate tiles
so that specular reflection from the
light sources looks reasonably good.
- Use perspective viewing.
- The 'v' key should toggle the view mode. In one mode,
the camera remains fixed and we get a view of the scene
from some fixed location.
In the second mode, the view is from the robot's
eye. Thus, in this case we see what the robot would see.
In particular, as the robot moves or rotates its head, the
view changes.
When implementing the assignment you should start with just fixed color objects
(no lighting) and orthographic viewing. Once you get the geometry
of the robot working (50 points), then add (one at a time) perspective viewing (10 points), lighting (30 points),
and secondary camera position (10 points). Ten bonus points if your robot can
juggle four or more balls.
Submit your code with a README file that contains
both compiling instructions (for example, you might have a makefile
or some other means of compiling your program) AND instructions on
how to operate the robot. Have fun with this!!!