CS 381
>
Assignment 7
CS 381, Fall 2007
HW #7
General Information
- Submit your answers to the questions, C++ source programs and
screenshots
of the graphics window to Blackboard by Tuesday, November 20.
- Send source and screebshots only! No executables,
project/workspace files, etc.
- Due: Tuesday, November 20 (any time).
- Worth: 20 points.
Homework Policies
See the
Homework Policies
handout.
Program (20 pts)
Write a C++ program using OpenGL/GLUT
that meets the following requirements.
- Your program must draw a scene containing at least three
different glutSolid 3-D
objects,
with proper hidden-surface removal. At least one of the
objects must represent a shape with curved surfaces.
- Make use of the model/view transformation to place
objects, lights, etc.,
in the scene.
- Allow the user to navigate in your
scene using Logo-style turtle graphics user-interface
concepts.
Dragging the mouse left or right causes the camera to rotate left or
right about its y-axis. Dragging the mouse up or down causes the camera
to move forward or backward in the direction it is pointed. The
camera's y coordinate is fixed as it navigates in the x-z plane.
These actions must be implemented by properly using the OpenGL viewing
APIs to control the model/view and
projection transformations.
- Include proper lighting using the Phong model. Note
that the camera navigation should occur independently of the objects
and lights in the scene. It should be possible to view objects
from different positions while the light remains fixed. Discuss
how the shaded appearance of curved surfaces changes as the camera
moves. Explain any effects which change as the camera moves.
- Describe the features of your program, include screenshots and
descriptions of any Extra Credit (see below) in a text file.
- Your program must provide documentation in either a
graphics window or a pop-up menu,
as in previous assignments.
Extra Credit:
- Add additional objects to create an interesting scene with a
theme (sculpture gallery, furniture display, architectural
construction, etc.)
- Allow the user to change the lighting parameters somehow (light
properties, material properties, etc.) through a menu.
- Add a spotlight located at the camera's position, pointing in the
same direction as the camera such that the spotlight moves with the
camera and illuminates objects as the camera is aimed at them similar
to the lamp on a camcorder.
- Allow the user to view, modify, and/or navigate in your
scene using one or more of the following user-interface
concepts.
These must be implemented by properly using the OpenGL model/view and
projection transformations.
- Zoom & pan. Here, “pan” means translating horizontally or
vertically in order to
change the point being viewed; “zoom” means scaling about the point
being viewed. Remember that a usable zoom & pan interface does not
pan at high speed simply because the zoom is “close in”. Although
zoom & pan is essentially a 2-D interface, your scene must
have some 3-D elements.
- Allow modification of model/view transformations affecting
the scene, as well as projection transformations affecting the
properties of the camera: moving smoothly between narrow-angle and
wide-angle “lenses”, etc.
- Flying. The user must be able to move the camera forward
(“forward” is the direction the camera is pointing) and turn the camera
left/right and up/down. You may implement either an airplane-style
interface, where “up” is always the same direction, or a
spaceship-style interface where “up” can change.
Project (5 pts)
The project topic assignment, proj1, is due
on Blackboard by Tuesday, November 20. Submit under Project
Assignment #1.
Note
Particularly well-done programs may be demonstrated in class.
CS 381, Fall 2007: Assignment 7 /
Last update: 15 Nov 2007