Harvey Mudd College
Computer Science

CS157: Computer Animation


Project 1





In this programming assignment you'll extend your user interface to allow a user to create a 3D Bezier curve then animate a box to move along the curve at constant speed. Your program should
  1. Allow the user to create and edit control points.
    1. The user should be able to create a new control point. It is difficult to specify a position in 3D space so you should create the point at a "good" position; i.e. not too close to any existing points and within the current view volume. The ordering of points is important so connect the control points in the order that they are entered by a dashed line.
    2. The user should be able to (recursively) delete the last control point in the chain.
    3. The user should be able to select and deselect an existing control point. At any pooint at most one control point should be "active." Read the section of the red book on "picking" for help with this feature.
    4. The user should be able to move the "active" control point in the x, y, and z directions in world coordinate. Provide some sort of "handle" for the active control point to cue the user as to the available directions of movement. Design the interface so that moving points is simple and intuitive.
    5. Display the cubic Bezier curves for the control points. Since four control points are required to specify each curve, the last one, two, or three control points may not be part of any curve. Adaptively choose the sampling step size.
  2. Allow the user to create a box then move it along the curve at constant speed.
    1. The user should be able to specify the width, height, and depth of the box.
    2. The user should also be able to specify the number of seconds the motion should take from start to finish. (Don't worry that the time is too short given the computer's frame rate.)
    3. At all points the box will be oriented to the coordinate axes; width in x, height in y, and depth in z. The center of the box should move along the curve.
  3. BONUS POINTS
    1. Use deCasteljau's algorithm with adaptive resampling to draw the curve.
    2. Allow the user to specify an arbitrary speed curve and animate the box position accordingly.
    3. Allow the user the option to have the program select control points to ensure C1 continuity.