Lab Assignment 4 -- Demo and writeup due Thursday, April 20
CS 5721, Spring Semester, 2006
20 Points
Topic: 3D animation using SPHIGS and animation scripts

The assignment: is to first add more animation to the robot_anim program, and then modify it to read in its animation file.

Part 0: Copy all the files in the lab4 subdirectory of the class account to your (lab4) directory.

Part 1: The helicopter robot
Discussion:
Compile the robot_anim program if you haven't already. Run it to see how it works. To run the robot animation: the program expects to read the viewing specification from standard input, so you should redirect the `viewing specification' file, robot_anim.data (which is contained in the lab4 directory of the class account), as follows:

  robot_anim < robot_anim.data
Enhance the Animation: Currently, the animation stops where the robot holds the rod above its head. Modify the robot_anim.c program so that the robot spins the rod 360 degrees over its "head" like a helicopter, then spins the rod 360 degrees the other direction. It might be easiest to spin the arm along with the rod. Part 2: An animation script
In addition to the viewing specifications, have the main program read a "script" of movements from the robot_anim.data file (you can rename it if you like), rather than having the movements hard-coded as they are now. For example, the following lines of script:
mv 30.0 -40.0
sp EAST t
would call moveto( 30.0, -40.0 ) and then spinrobot( EAST, true ). You can use any other convenient format for your script file. A more general script file would contain structure descriptions, allow for the specification of light sources, and allow the viewing parameters to change (e.g. changing the PRP would change the view by changing the position of the eye/camera).

Extra credit:

  1. (1 point) Have the robot rise as the rod is spinning the first direction, then descend as it spins the opposite direction.
  2. Any other feature approved by the instructor.

What to turn in or demo:
Due to the visual nature of this program, you will do a live demo to show that its features work correctly. Turn in or do the following items from the Computer Science Lab Report Format:
1. (1 point) The Basic Information (your name, class, section, TA's name, assignment number, and date) can be on a separate cover sheet or as (highlighted) comments at the top of your main program file.
2. (1 point) The Problem Statement is a brief description of The assignment: above. Note: the problem statement can (and should) be in a comment at the top of your main program file.
9. (If done.)
11. (8 points) Include the Program Listing(s). These listings should show good style, be appropriately commented, have the new parts highlighted that you added to the original robot_anim.c code, and include handwritten explanations if it helps the reader's understanding of the code. Also include a printout of your animation script.
13. & 14. (10 points) Do "demos" of the required features of your program. Also, do a demo of any extra credit items.
15. Include a description of any Known Bugs if needed. You may be able to gain back lost points by a careful analysis of what went wrong and possible fixes.
16. This is optional (and no points usually), but it is useful to think about Possible Improvements. Obviously there are many for this program.
17. Comments on the lab assignment are also optional (and again, no points usually), but appreciated!

Important Note: You may discuss algorithms with other students, but the program and lab report should be your own work.


Page URL: http://www.d.umn.edu /~ddunham/cs5721s06/assignments/lab4/assignment.html
Page Author: Doug Dunham
Last Modified: Tuesday, 11-Apr-2006 17:31:37 CDT
Comments to: ddunham@d.umn.edu