CS 481/681
>
Assignment 1
CS 481/681, Spring 2004
Assignment 1
General Information
- E-mail
C++ source for the program described below to me at
ffggc@uaf.edu,
using the subject
"HA1".
(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: Thursday, January 22 (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.
- Your program must draw a 2-D or 3-D scene,
allowing the user to modify the scene in some way.
- Your program must implement and make use of drawable objects
via a base class and a number of derived classes:
- Have an abstract base class (called Drawable unless you have a better name)
that implements the basic interface for a drawable object.
- Have at least three derived concrete classes, each implementing a different type of drawable object.
- Declare (and draw!) at least one object of each derived class.
- Somewhere in the program, deal with an object polymorphically:
access it via a base-class pointer or reference, and use a virtual function,
without knowing what the type of the object is.
Suggestions for Full Credit
As explained in the
Homework Policies handout,
homework assignments that exactly follow the above specifications will receive 80% credit.
For full credit,
doing any one of the following is sufficient.
- Implement a “transform yourself” interface in one of your classes.
For example, you could tell an object to translate and/or rotate itself.
- Have the reflection properties of an object determined by a separate material class
(maybe use such a material class you wrote for CS 381?).
- Add a more advanced OpenGL feature to your program.
For example, try learning about and implementing one of the following.
- point, line, or polygon smoothing
- blending
- GLU tesselators
- the stencil buffer
- the accumulation buffer
Do not expect full credit on two different assignments for the same advanced feature!
- Have your program do something practical.
You will need to explain to me why you think your program is practical.
- Make your program some kind of game, with scoring, rules, etc.
- Do something else ... surprise me.
Note
Particularly well-done programs may be demonstrated in class.
CS 481/681, Spring 2004: Assignment 1 /
Last update: 1 Feb 2004 /
Glenn G. Chappell /
ffggc@uaf.edu