CSE 457: Intro to Computer Graphics


Project 4: Animate

Date Assigned: Monday, November 24, 1997
Date Due: Wednesday, Dec 10, 1997


Project Objectives

This project is designed to introduce you to splines and how they are used for animation. There are two parts to this assignment; please get your splines checked off by a TA before moving onto the artifact.

Animator Interface


The user interface for the animator program will allow the user to vary any parameter within the scene. All scene nodes are displayed in a text tree in one window. A node that is selected from this window will have its field values varied over time according to lines displayed in the curve window. The curve window shows a line that can be adjusted by clicking and dragging its control points. The x-axis represents time and the y-axis is the parameter value, so each control point corresponds to a position at an instance in time. Two views of the scene being animated are below the curve window. You can view the scene at any frame by moving the current frame marker in the curve window. You can change your geometrical viewpoint by clicking inside the scene window or preview your animation using the play, pause, rewind and fast forward buttons below the scene views.

Required Extensions


Currently, the system is incomplete. You will need to implement some routines for the curve window portion of the interface. So far, linear interpolation is the only type of 'curve' implemented. Linear interpolation is how VRML animates. A line segment is drawn between adjacent control points, and the parameter value is evaluated along that line for every time between the two control points. You will improve upon this system by ading the capability for a parameter to be evaluated along a curve, thus giving smoother movement to your characters.

There is a Curve class defined in Curve.h which you will find useful. Your code belongs in EvaluateCurve.C. You will need to write one routine that that takes as inputs The function should output the curve value y* at time t*.
To do this, the function needs to search for the curve segment i such that t[i] <= t* <= t[i+1]. It then needs to find the value of u such that t[u] = t* and then output y[u]. You could do this second part using binary search on the interval 0 <= u <= 1.
C2-interpolating splines have an extra two degrees of freedom that are unspecified by the control points. Probably the simplest way to handle this is by drawing what was referred to in class as "natural" C2-interpolating splines, that is, let the derivatives at the two endpoints be equal to zero. There are other valid ways to handle this, see the bells and whistels section.
Time needs to be monotonically increasing. It doesn't make sense to have something moving backwards in time, or you can think of it that every point in time needs to correspond to exactly one parameter value. Note that for interpolating curves (type "CatmullRom" or "C2interpolating"), the condition that the t values of the control points does not necessarily ensure that the curve itself will also monotonically increase in t. You should recognize this case and remind the user to move the control points.

Get this much ok'd by a TA before continuing.

Animation Artifact

You will eventually use the curve editor to produce an animated artifact for this project. Each person must turn in their own artifact. We may give extra credit to those that are exceptionally clever or aesthetically pleasing. Try to use the ideas discussed in lecture, such as: anticipation, follow-through, squash and stretch, and secondary motion.
Note: You need to remove all PROTO's, scripts, events, routes, textures, timers and interpolaters from your VRML file before feeding it to the animator. If you need to, you can add them back in once the spline animator has worked its magic.

Bells and Whistles



[Whistle] Enhance the requred spline options



[Bell+Whistle] If you find something you don't like about the interface, or something you think you could do better, change it! Any really good changes will be incorporated into Animator2.0.



And Finally...

When you are finished with this assignment, type "make clean" to clean up unnecessary disk space.