(You will need the project files located here)
This assignment will require you to use the concept of transform matrices to correctly position and animate a pre-created
scene. It will also involve creating a more complex control interface using
FLTK. You should look at the included example program "assn1_ex.exe" and use it
as a guide for your final project.
Part 1: Transforms
Much of the code for this project is already done for you. You will have to
complete a few function bodies, all of which are marked with comments. These
functions are draw_wheels, draw_ladders, draw_body,
draw_truck, and SetView. Inside each of these functions are
comments that roughly outline what the code you will fill in should do. The
animation for the scene is already done for you, and a set of global
variables containing the appropriate positions and rotations of the various
objects is included. All that is left to you is to uses these values to draw the
scene appropriate. As a starting point, you should look at the sections on the
glRotatef and glTranslatef functions in your Red Book. You may also
want to look up the gluLookAt function.
(New!) Model Dimensions
Here is some additional information regarding the models used in the project.
The accuracy of these numbers may vary depending on the way you do your
transforms and whatnot, but they should be good places to start.
The wheel positions for the truck (relative to the truck's origin) are:
The dimensions of the ladder(s) are:
- (1.65, -0.5, 0.6)
- (1.65, -0.5, -0.6)
- (-0.625, -0.5, 0.6)
- (-0.625, -0.5, -0.6)
The origin of the ladder is at the center.
- 3.0 units long
- 0.05 units thick
Part 2: FLTK Interface
Using FLTK, you should extend the included interface to include
value_slider controls that will allow the user to manually control the
truck position and ladder orientation and elevation, in addition to the included
camera controls. You should look at the included camera sliders as examples for
how to implement your new controls.
Grading As always, grading would be a semi-subjective score out of 10
points, based both on functionality and the commenting of code. You should be able
to (and should, in your comments) explain what each line of code you add does, and
we should be able to follow your additions easily.
(New!) Turn-In Instructions
To turn in the project once you are completed, follow these steps:
- Zip up your source files, project, and data files into an archive entitled
"[ABCD]_[WXYZ].assn1.zip", where ABCD and WXYZ are the e-mail
IDs of you
partner (or just yourself if you are working alone).
- Upload this archive to your public_html folder on either your
blue.unix or CS Domain home directory.
- Send an e-mail to Prof. Luebke (CC'd to the TA) titled "Assignment 1 turn-in",
containing the names of you and your partner, and a link to the file.