Catmull-Rom spline
From Free net encyclopedia
In mathematics, a Catmull-Rom spline is a cardinal spline with a tension of 0.5.
In computer graphics, Catmull-Rom splines are frequently used to to get smooth interpolated motion between key-frames. For example, most camera path animations generated from discreet 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.
Explanation
Given n+1 points
- p0, ..., pn,
to be interpolated with n cubic Hermite curve segments, for each curve we have a starting point pi and an ending point pi+1 with starting tangent mi and ending tangent mi+1 with the tangents defined by
- <math> \mathbf{m}_i = \frac{1}{2}(\mathbf{p}_{i+1}-\mathbf{p}_{i-1}) </math>.
with the first and last tangent given.
External links
- Introduction to Catmull-Rom Splines, MVPs.org