570/761 Programming Assignment 3
Due: Sunday, October 24, 2004
The purpose of this programming assignemnt is to provide
- an understanding of modeling in 3D,
- an understanding of the 3D viewing model, particularly OpenGL's version,
- an understanding of how to create animation, and
- an understanding of the use of callback functions in creating interactive graphics.
You are to write an application program which minimally uses the
OpenGL API to try the following:
- Create a 3D model comprised of at least 5 objects. You may use the GLUT and/or GLU objects if you wish.
(Please be aware that if you are creating your
own objects, you will need to also generate their normals for lighting
and material properties for assignment 4.)
- Be sure to use at least two different non-default camera coordinate
specifications. (You may find it helpful to control this using keyboard
input to move between settings or you could do create some animation that
involves some camera movement.)
- Animate one or more of the objects, using glRotate, glScale,
and glTranslate. (You might also try your hand at animation using
multiple "different" images, i.e., the jumping jack example.) I should be able
to see that an object is animated using each of these (individually).
- Use mouse button control to decide the speed and "direction" of the
animation. Use left mouse button to initiate animation using rotation,
the middle to initiate animation using translation and the right to
initiate animation using scaling. (This involves the use of glMouseFunc,
- Maintain animation when no mouse button is pushed, i.e., using the
- You may find it useful to use glPushMatrix and glPopMatrix.
What you "draw" is up to you, but please make it interesting enough that
you'll enjoy adding material properties, lighting, textures and fog to it
for the final programming assignment.
- You might find the source code in usr/local/pub/ncs/graphics/OpenGL/ExamplesLab3/ interesting.
- I will add to this as I think of things.
What to submit
You are to submit a directory called lab3dir using the
submit -v ncs-grd cg1lab3 lab3dir
where lab3dir contains your application program lab3.c, a
Readme file, if pertinent, and a makefile.
I should be able to type
to compile your application program's source file(s) and create
a UNIX executable lab3, which is to be created by linking your
application program with the OpenGL and GLUT libraries.
If you choose to use C++, instead of C, please be sure to include a
Makefile which has been modified to meet the specifications above.
- You are expected expected to use the names Readme, lab3dir, and lab3 as specified above. As I am using scripts to
help with the grading process, failure to do so is annoying and you will be
suitably awarded! :-)
- You are expected to include a Makefile and it should
function as specified above.
- Your directory should only include the source files, any header files that
you have created, a Readme file and a Makefile, i.e., please remove any backup
files, executables, etc. before submitting.
Your overall programming assignemnt grade will be based on the following:
demonstration that you know how to use the required routines, the complexity
(how interesting) of graphical output, internal documentation, and program
design. The gradesheet I will use can be viewed
When I begin grading your submittal, if there are any problems,
I will send you e-mail and you must then resubmit within 24
hours. Incorrect submittals are subject to penalties!
Nan C. Schaller
Rochester Institute of Technology
Computer Science Department
102 Lomb Memorial Dr.
Rochester, NY 14623-5608
August 25, 2004