|
|
|
Purpose |
|
| To understand and implement a program using hierarchical transformations.
Secondary: to implement simple object selection and interactive manipulation, and to use a perpective transformation. |
|
|
|
|
Task |
|
Write a C program using GLUT and OpenGL calls to create a "blobby man". This fellow should have the following parts, with their hierarchical nesting indicated by the indentation:
For example, the right foot is a child of the right calf, etc. This hierarchy should correspond to the transformations you store internally and issue when drawing the man -- each piece should be positioned relative to its parent, and the transformations you store internally should reflect this. The origins of each parts should correspond to the joint around which you rotate it. (ie. the upper arms should be defined with their origin at the shoulder, the lower arms should have their origin at the elbow, the hands at the wrist, and so on. The origin of the body should be in the center of the torso sphere). You may assume that each part can only rotate around one axis (even though some joins support multiple axis of rotation, in reality). Each piece of the man should be created with an appropriately scaled sphere. You should color the spheres in some "reasonable" way (ie. use a few different colors, perhaps to indicate a shirt, shoes, pants and skin).When the program starts, the man should be in a standing pose: upright, arms and legs straight and hanging down. You should be able to manipulate the man using a click-and-drag interaction technique (as described below) to rotate all the parts. You should implement a "debug mode" (described below), which is toggled on and off when the user presses the "d" key. We suggest implementing this early on, to help you debug your code. |
|
|
|
|
Turn in |
|
| Your program should consist of a set of files which should be commented with your name and a description of the contents of that file, as well as the usual comments throughout the file. Your submission MUST include a makefile, and MUST be mailed to the class account as a single, uuencoded tar file (as described on the web page). (Using MIME attachments to turn in files will make the grader crabby and result in much tougher program grading!)
The time the mail is received will be used to determine whether or not the program is late, so be sure to allow a couple of minutes for the mail system to transmit your file if you are working right up to the deadline. IMPORTANT: If the TA has to edit your files, including your Makefile, you will lose points. |
|
|
|
|
Due date |
|
| This program is due before class on Friday, October 15th. This means it must be received by 9:59am EDT on Friday to not be considered late. | |
|
|
|
Additional Instructions |
|
| Interaction
To manipulate the man, you should use the following interaction technique (make sure the colors you choose for the parts are different from the two colors used for the interaction):
Transformations per object You will need to store three sets of transformations for each part:
Debug Mode The debug mode in this assignment is simple. When it is turned on or off, you should print to standard output a description of the transformations you would issue (each of the three kinds above, per object) to redraw the screen. When the user is rotating a part in debug mode, you should print the mouse starting location (where the user clicked), the current location of the mouse, the difference in the x direction, the computed angle of rotation. Basic Submission At a minimum, your program should create a window and create a blobby man in a standing position (50% of the grade). The interaction with the mouse is required for the remaining 50%. |
|
|
|
|
EXTRA CREDIT |
|
| Extra credit will be give for doing the following things. You may implement one or both of the following options, each of which may be worth an additional 10% (depending on how well they are implemented).
All extra credit programs should be contained in separate source files, and your makefile should create additional executable programs for each. (ie. your submission must still contain an implementation of the basic program that perfoms as described above.)
|
|