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.

## Equations

Two points on each side of the desired portion are required. In other words, points and are needed to calculate the spline between points and .

Given points , , and , the coordinates of a point located between and are calculated as:

## General case : tension

The previous equation is a particular case of the general geometry matrix given by the following equation:

The parameter 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).

## Derivative

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:

## Properties

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

## Examples

## Download

**Catmull-Rom splines 1.34 KB**