Computer Graphics I
4003-570-02 / 4005-761-02 (Fall
2007)
Assignment #3: 3D Drawing /
Animation in OpenGL
Date posted:
October 17, 2007
Date due: October 27, 2007 at 11:59 p.m.
Drop box available
at myCourses
Purpose
The purpose of this
programming assignment is to provide
- an understanding of
modeling in 3D,
- an understanding of the
3D viewing model, particularly OpenGL's version,
- an understanding of
hierarchical models,
- an understanding of how
to create animation, and
- an understanding
of the use of callback functions in creating interactive graphics.
Task
In this project, you will
develop a program which illustrates the use of OpenGL to perform animation using
3D objects.
What you draw is
completely up to you, within the constraints of the following requirements:
- Your 3D model must contain at least five objects. You are free to use
the GLUT and/or GLU objects (teapot, sphere, etc. -- See Chapter 8 in text
for some examples) if you wish, or you may define your own. Your objects
must be obviously different in some characteristic (shape, color, etc.) so
that they are easy to spot. Include at least one hierarchical model.
- You must use at least two different, explicit (i.e., not the default)
camera positions. Initially, your program should be using the first camera
position; use the number keys to switch between camera positions. An input
of '1' should switch to the first position and '2' to the second; if you
have more positions, use number keys '3' through '9'.
- Animate one or more of the objects in your scene using the standard
transformation routines. Each transformation must be used; you may use them
all at once, in sequence, in response to user input, on separate objects,
etc., but all must be used. You may also experiment with other methods of
animation (e.g., multiple images in sequence). Animation should not begin
until the user enters the character 'a' on the keyboard. Once animation has
begun, you may use other user input to control it (e.g., dragging the right
mouse button to control rotation, etc.).
- Once it has started, animation must continue even without further user
input; this can be a repetitive event (e.g., blinking eyes in a character),
or a series of random changes (e.g., an ice skater randomly skating around a
pond).
- Recognize the character 'q' as a request to quit the program.
You will need to use the
following OpenGL/GLUT routines:
| Routine(s) |
Purpose |
glutKeyboardFunc
glutMouseFunc
glutMotionFunc
glutPassiveMotionFunc |
Callbacks for handling keyboard and mouse input |
glutIdleFunc |
Callback to use for continuous animation |
glRotate*
glScale*
glTranslate* |
OpenGL transformation routines |
glPushMatrix
glPopMatrix |
Transformation matrix stack controls |
If you recognize user input
other than the required keyboard input mentioned above ('1', '2', 'a', 'q'), put
detailed usage instructions (e.g. how to use the mouse to control animation,
other keys for selecting more camera positions, etc.) in a file named README,
and submit this with your solution.
You may, if you wish, also
experiment with lighting, materials and textures, fog, etc., but this is not a
requirement for this assignment, as you will be using these in Project 4.
Notes:
- You are expected to use at least, EACH of the routines mentioned above..
- "Best Of" selections from previous quarters are available for your
viewing from the page
http://www.cs.rit.edu/~ncs/Courses/570.shtml. You'll need to copy the
executable into your Unix account to run them. I will select the "best" of
your submittals to add to the web page and for use in future demonstrations.
Useful sample code for
OpenGL can be found
here and
here. Please feel free to use these as a starting point.
What to submit
Please submit all files
necessary to build and run your program. This includes source files, header
files, project files, and Makefiles. If possible submit an executable also. In
addition, the submission should include a README that indicates the platform on
which your assignment is built, as well as notes on how to build and run your
project.
Platform specific OpenGL libraries should exist on each platform that supports
OpenGL. (In most cases, these libraries are supplied by the manufacturer of
the graphics card present on your system). If you are planning on using the
Suns for your project, please make use of the following
header.mak file to
see the proper libraries that need to be linked and the locations of those
libraries. (Note that if you use makemake or gmakemake, the contents of this
file will be incorporated into the Makefile produced).
All submission should be made using
myCourses. Look for the folder named "Programming Assignment 3" in the
dropbox area.
Assessment
Your grade will be based on the complexity of your output (i.e., how
interesting it is, how many objects you have, etc.), your animation, how your
program responds to user input, your program design, and your internal
documentation.
While the primary goal of this project is for you to draw something
using the required elements described above, a portion of your grade is based
(subjectively) on how ``interesting'' (complex, unusual, etc.) your design is. I
realize that not everyone is an accomplished artist; photorealistic depiction of
objects is not a requirement - effort is more important.