aimstil
5.0.5
|
Interpolation using the Catmull-Rom polynomial. More...
#include <til/CatmullRomInterpolation.h>
Public Types | |
typedef CatmullRomInterpolation | Self |
Static Public Member Functions | |
static T | compute (T f1, T f2, T f3, T f4, T x) |
Returns the interpolated value of four numbers using the Catmull-Rom method. More... | |
Interpolation using the Catmull-Rom polynomial.
Computes the Catmull-Rom interpolation of the sequence (f1, f2, f3, f4) (supposed to be equally spaced and at position (-1, 0, 1, 2)). 'x' is the position of the point where we want an interpolated value, and has to be in the range [0, 1].
The Catmull-Rom spline is 3/2.x^3-5/2.x^2+1, -1/2.x^3 + 5/2.x^2-4.x+2. It it the only 3rd order interpolating spline of support of length 4 that is C^1 and has no 2nd order moment. It has been implemented using the factorization of (Meijering03) that needs the computation of only two cubic polynomials per point.
Definition at line 33 of file CatmullRomInterpolation.h.
typedef CatmullRomInterpolation til::CatmullRomInterpolation< T >::Self |
Definition at line 37 of file CatmullRomInterpolation.h.
|
inlinestatic |
Returns the interpolated value of four numbers using the Catmull-Rom method.
f1 | Value assumed to lie at position -1 |
f2 | Value assumed to lie at position 0 |
f3 | Value assumed to lie at position 1 |
f4 | Value assumed to lie at position 2 |
x | The interpolated value at position x |