Project 4: OpenGL Robot
Due: Tuesday, Dec. 3
Overview
In this assignment you will implement an OpenGL robot that can be
controlled by the user. This assignment is loads of fun! The
earlier you start the more fun you'll have. Unlike previous assignments,
we are not supplying you with any skeleton code to start from. This is
your chance to show what you've learned about OpenGL and create an
aplication entirely from scratch. Look at your OpenGL book, the GLUT
guide, and previous projects for guidance.
What You Have to Do
The assignment is worth 20 points. Following is a list of features
you may implement and their point value. Items listed in
bold are required.
- (2) The robot should have a body, a head, and a right arm. Left
arm and other body parts are optional. Be creative! Initially use
ambient light to light the scene. Use perspective projection.
- (1) The robot's position should be user controllable via the
keyboard or mouse.
- (1) 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.
- (1) 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.
- (1) Add menus. Initially the menu options should include "Quit"
and "Adjust light." When the user selects "Adjust light" you should query
the user for new ambient values and adjust the light accordingly.
- (2) Add lights and diffuse and specular lights material
properties. There should be (at least) one point light source and one
spotlight. The spotlight should be mounted on top of the robot's head and
should rotate and move with the head. Allow the user to adjust the
intensity of the lights and to reposition the point light.
- (1) The robot should live in a 3D space with a shiny floor and
at least a few 3D objects in it. Make sure to partition the floor into a
number of separate tiles so that specular reflection from the light
sources looks reasonably good. The user should be able to zoom in and out
and move the viewpoint so the world can be viewed from different
perspectives. At least one object should have a metallic appearance.
- (1) Allow the user to toggle the viewpoint to see the world
from the robot's eyes. As the robot moves or rotates its head, the view
changes.
- (2) Add shadows with polygon offset.
- (1) Add a help option to the menu that prints an explanation of
the keystrokes your program accepts and how the mouse can be used.
- (2) Add reflections using the stencil buffer to prevent reflection
beyond the floor.
- (1) Add some transparent objects using blending.
- (1) Add something to your world that uses bezier patches or NURBs.
- (1) Add texture mapping.
- (1) Add a mirror (the floor does not count!). (Be sure to consider the
possible viewpoints; i.e. the robot can look in the mirror and see
itself.)
- (1) Use display lists to build the floor and robot.
- (2) Add shadows using shadow volumes.
- (?) Impress us with something we hadn't considered.
By implementing all the required features, you get 13 points. There are
many ways to get more points:
- (?) implementing optional features
- (2) incorporating a cool robot trick (eg. juggling, unicycle riding,
dancing, etc.) that is initiated from a menu option, plus an MPEG movie
of the trick.
It is possible to get more than 20 points. However, after 20 points,
each point is divided by 2, and after 22 points, each point is divided by
4.
What to Submit
You should submit:
- the complete source code for your robot,
- a makefile,
- the .mpeg movie for the movie feature (optional),
- a writeup.
The writeup should be a HTML document called assignment2.html which may
include other documents or pictures. It should explain how to operate the
robot and enumerate which features you've implemented. If you submit a
movie, it should also explain how you created the movie.
Make sure the source code compiles in the graphics machines. If it
doesn't, you will be in a world of hurt.
Remember our standing late policy and collaboration policy.
Notes
- Stay tuned for more notes
Links
Last Update: 7/24/02