CS 381
>
Assignment 8
CS 381, Fall 2003
Assignment 8
General Information
- E-mail
C++ source for the program described below to me at
ffggc@uaf.edu,
using the subject
"GA8".
(If you wish to discuss the assignment with
me via e-mail, use a different subject.)
- If possible, please send your source as an attachment to your e-mail,
rather than as part of the body text.
- Send source only! No executables, project/workspace files, etc.
- Be sure to include your name in your e-mail.
- Due: Tuesday, November 18 (any time).
- Worth: 25 points.
Homework Policies
See the
Homework Policies handout.
Program (25 pts)
Write a C++ program using OpenGL/GLUT
that meets the following requirements.
- As before, draw a 3-D scene with proper HSR.
- Make use of the model/view transformation to place objects, lights, etc.,
in the scene.
- Include proper lighting using the Phong model.
- Allow the user to change the lighting parameters somehow
(light properties, material properties, etc.).
- Your program cannot rely entirely on normals generated by GLUT:
gluSolidTorus and the like.
You must include a glNormal* call
(or use an “evaluator”; see “Suggestions for Full Credit”, below).
- Your program must provide documentation in either a graphics window or a pop-up menu,
as in previous assignments.
Suggestions for Full Credit
As before, but here are some new ideas.
(The old ones will still work, assuming they have not been covered in class yet.)
- Figure out how to use OpenGL evaluators. Use one.
(You can also get the evaluator to generate normals for you!)
- Write the lighting yourself, without using OpenGL lighting commands
(vecpos.h might help).
- Implement smooth vertex-normal generation using the Gouraud-shading technique
(a vertex normal is the normalized average of the facet normals of adjacent facets).
Note
Particularly well-done programs may be demonstrated in class.
CS 381, Fall 2003: Assignment 8 /
Last update: 11 Nov 2003 /
Glenn G. Chappell /
ffggc@uaf.edu