CSE 694A: Lab 2
Due Wednesday, Oct. 8

LAB 2: Path following with ease-in/ease-out


PRELIMINARY NOTES

Use the main routine and support routines from lab 1.


ASSIGNMENT

Write a program to animate a cube that follows a curved path through a given set of points starting from a stopped position, accelerating to some maximum speed and then decelerating to a stop at the initial position. The coordinates of the points to be interpolated can be hardcoded in your lab. Use at least 8 non-coplanar points.

The initialization part of this lab will:

  1. set coefficient matrices for beginning segment, interior segments, and end segment.
  2. For each segment, loop through points, summing linear distances to create a table of parametric value and summed linear distance to approximate arc length and the computed point. Compute at least 200 points per segment.

The simulation part of this lab will:

  1. increment a time value, t, that goes from zero to one as the curve is traversed
  2. apply an ease function, s = ease(t), using constant acceleration assumption
  3. search the table created by the initialization routine for the entries s is between
  4. compute the fraction that s is between the two entries.
  5. use the computed fraction to interpolate between the points recorded in the table, u = table(s)
  6. evaluate the interpolation function to produce a point along the curve, p = P(u)

Display the interpolated points using small cubes


NOTES


Debug Suggestions