Catmull-Rom: spline and filter

1.1k Views Asked by At

On this website, the author gives this definition for Catmull-Rom splines (slide 10):

$$catmullRom(t) = \frac{1}{2}\left\{\begin{array}{ll} t^3 + 5t^2 + 8t + 4 & \text{if } -2 \le t \lt -1\\ -3t^3 - 5t^2 + 2 & \text{if } -1 \le t \lt 0\\ 3t^3 - 5t^2 + 2 & \text{if } 0 \le t \lt 1\\ -t^3 + 5t^2 - 8t +4 & \text{if } 1 \le t \lt 2\\ \end{array} \right.$$

An equivalent definition is found in Fundamentals of Computer Graphics, Fourth Edition on page 203, which refers to it as a "piecewise cubic filter". Indeed, the website says that while a single curve is filter, one can scale many curves by desired values, spread horizontally with even spacing, and sum them. This creates a single spline useful for keyframe animation.

However, all other information I've found (five links) on Catmull-Rom splines begins with two points, and interpolates between them using the known derivatives at each point (or from two other points which are not interpolated). These sources usually specify a 4x4 matrix,

$$\frac{1}{2}\begin{bmatrix} -1 & 3 & -3 & 1\\ 2 & -5 & 4 & -1\\ -1 & 0 & 1 & 0\\ 0 & 2 & 0 & 0\\ \end{bmatrix} $$

The top row (read right-to-left) matches the coefficents of $t^3$ above, but otherwise the values are not the same.

What is the relationship between these two constructions both referred to as Catmull-Rom splines? The first is a piecewise cubic filter applied to a single value, with interpolation emerging only from summing multiple such filters. The second seems to require (at least) two points in all cases.

Secondarily, I have not found any derivation for the piecewise function, and would like to know its origin (which I suspect, or hope, is related to the matrix).