The Catmull-Rom splines is a method that approximate a set of points (named control points) with a smooth polynomial function that is piecewise-defined. One of the properties of the Catmull-Rom spline is that the curve will pass through all of the control points.
Two points on each side of the desired portion are required. In other words, points
are needed to calculate the spline between points
, the coordinates of a point
are calculated as:
General case : tension
The previous equation is a particular case of the general geometry matrix given by the following equation:
modify the tension of the curve. The following figure illustrates the influence of the parameter
on the curve. Note that
is commonly used (as in the particular case presented previously).
As the spline is continuous it is possible to compute the derivative for any value of . Moreover, as the definition of the spline is a polynomial, it is quite trivial to compute the derivative at a given point:
The spline passes through all of the control points.
The spline is continuous.
The spline is not continuous.
The spline does not lie within the convex hull of their control points