BU
CAS
CS 480
Introduction to Computer Graphics
Spring 1996
Programming Assignment 5:
Shading, Lighting, and Camera Modeling
Due before class on Thursday April 23
Write an OpenGL program that allows the user to create and modify a
collection of shaded 3D solid objects. Your program should provide at least
the following capabilities:
- shaded (Z-buffered) display of the scene
- perspective viewing, with user-controlled camera parameters:
field of view angle, 3-D camera position and orientation
- change material for properties for a selected object via pull down
menu options
- support for up to 5 colored light sources
- allow the user to turn lights on/off and change lights' colors
For extra credit, implement stereo viewing with red/blue glasses provided
in class.
Hints
Here are some example programs that may serve as good reference:
- The GLUT provides triangle generators for a few polygonal shapes:
glutSolidSphere, glutSolidCone, glutSolidCube, glutSolidTorus,
glutSolidTeapot, etc.
- The red book provides many example programs that demonstrate material
properties and colored lights. Source for these is available in the
directory "/usr/local/glut/progs/redbook". In
addition, there is a GLUT light lab progam in
"/usr/local/glut/progs/examples/lightlab.c".
Demos and Grading
Your project must run on the SGI, therefore you will need
to use one of the SGI workstations in the CGL cluster (unless you have
access to an OpenGL elsewhere).
Your program's source files are to be electronically submitted by using the submit program on cgl. The code you submit
should conform with the program assignment
guidelines.
Part of your grade for this programming assignment will be based on
your giving a short demo (2-3 minutes) in the CGL cluster. You will
be expected to talk about how your program works, and we will see
how well your program performs on some test examples. Demos will be
scheduled from 2-5 on the assignment due date.
Page Created: April 7, 1997
Last Modified: April 7, 1997
Maintained by: Stan Sclaroff