Spline Interpolation Demo : www.math.ucla.edu/~baker/java/hoefer

Click on and move around any of the points that are being interpolated. The curve is redrawn as points are moved.

We use a relaxed cubic spline to interpolate the six points. This means that between each two points, there is a piecewise cubic curve. When we string these curves together, we set the second and first derivatives at the endpoints of each piecewise cubic curve equal to that of the adjacent cubic curve's second and first derivatives thus providing for a continuous second derivative. This gives a smooth curve that passes through each point, thus interpolating them. The term "relaxed" is used because the endpoints of the cubic spline have their second derivative equal to zero.