Understanding splines
Name:
Due September 30th, in class
This worksheet is intended as a short 30 min exercise to be done in groups of 23 people.
CatmullROM splines
Consider a cubic CatmullROM spline with data points at

\(p_0 = (0, 0)^T\)

\(p_1 = (1, 1)^T\)

\(p_2 = (2, 0)^T\)
1) Draw the data points
2) How many segments does the spline have?
3) To ensure C1 continuity, what equations should we use to compute four control points for each interior segment of the spline? What about the endpoints?
4) Compute the control points for segment 0 (the first segment). Draw the control points above.
5) Compute the control points for segment 1 (the second segment). Draw the control points above.
6) Suppose each data point is uniformly spaced such that p0 is at time 0, p1 is at time 1, and p2 is at time 2. What is the value of the curve at p(1.5)?
Hermite splines
Recall that for Hermite splines, each segment is interpolated using the two endpoints \(p_1\) and \(p_2\) along with the slopes at each point.
We will derive the process for computing slopes which give us C2 continuity at each input key.
Our goal is to have
>Our approach is to derive expressions for \(f^{''}(0)\) and \(f^{''}(1)\) then use these expressions to setup a system of linear equations to solve for \(p_i^{'}\)
Recall that the equation for interpolating with a Hermite spline is
where

What is \(f^{''}(t)\)?

What is \(f_{i+1}^{''}(0)\)?

What is \(f_i^{''}(1)\) ?

We want \(f_i^{''}(1) = f_{i+1}^{''}(0)\). Substitute the expressions from the previous two questions into this equation.

In the previous question, which variables are unknowns and which are known?

Rearrange the terms from question 4 so that the unknown variables are on the right hand side and the known variables are on the left hand side. This equation tells us the relationship between the input keys and the slopes at each key.

Suppose we have a Hermite spline with 5 points
p0 = (0,0,0) p1 = (1,2,0) p2 = (3,3,0) p3 = (6,3,0) p4 = (8,0,0)
Plug in these points into your equation for question 6. You can define three equations that we can use to solve for the slopes.

Put the equations from the previous question in matrix form P = A P'.
A is a 3x5 matrix, P' is a 5x3 matrix of the slopes and P is a 3x3 matrix of vectors. What are the values for each row of P? What are the values of each \(a_{ij}\)?
How can we augment the above matrix to support clamped endpoint conditions?
How can we augment the above matrix to support natural endpoint conditions?