Cardinal spline
From Wikipedia, the free encyclopedia
In the mathematical subfield numerical analysis, a cardinal spline is a cubic Hermite spline whose tangents are defined by the 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.
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
where the first and last tangent m0 and mn are given and c is a constant that modifies the length of the tangent (the tension parameter).
The tension parameter c should be between 0 and 1. A Catmull-Rom spline is a cardinal spline with tension parameter c = 0.