Catmull-Rom Spline

Spline

A physical spline is a thin piece of wood or other flexible material. Before the advent of mathematical splines, designers used physical splines to draw curves. A designer would place the spline on a piece of paper and anchor it to a given set of points. The designer could then create a curve by drawing along the spline with a pencil. A given set of points could yield a variety of curves, depending on the properties of the physical spline. For example, a spline with a high resistance to bending would produce a different curve than an extremely flexible spline.

Cubic Hermite spline

A cubic-hermite spline is a spline built from two control points (start and end points) and two initial tangents which specify the direction of the spline at the control points.

Cubic Hermite Splines can be smoothly concatenated by ensuring that the tangents of neighboring splines are equivalent.

Controling the tangents can be difficult, a much easier variant is the cardinal spline, which uses an extra pair of control points instead of tangents.

 

Cardinal Spline

A cardinal spline is a cubic Hermite spline whose tangents are defined by the extra control points and a tension parameter. This spline creates a curve from one waypoint to another taking into account the waypoints before and after. By taking into account the way points before and after the current curve, the curves appear to join together making one seamless curve.

 

Comparison of Cardinal Spline and Bezier Curve

Catmull-Rom splines

A Catmull-Rom spline is simply a sequence of cardinal splines with a tension parameter of 0.5

Catmull-Rom splines are frequently used to get smooth interpolated motion between key-frames. For example, most camera path animations generated from discrete key-frames are handled using Catmull-Rom splines. They are popular mainly for being relatively easy to compute, guaranteeing that each key-frame position will be hit exactly, and also guaranteeing that the tangents of the generated curve are continuous over multiple segments.

Catmull-Rom Applet

Catmul-Rom in XNA