Functions | |
template<typename T > | |
T | hermiteInterpolate (T t, T value0, T value1, T derivative0, T derivative1) |
Hermite interpolation. |
T hermiteInterpolate | ( | T | t, | |
T | value0, | |||
T | value1, | |||
T | derivative0, | |||
T | derivative1 | |||
) | [inline] |
Hermite interpolation.
t | The function argument. | |
value0 | f(0) | |
value1 | f(1) | |
derivative0 | f'(0) | |
derivative1 | f'(1) |
Interpolate a function on the range [0..1] from the values and first derivates of the function at the endpoints. That is, perform cubic interpolation, using the values f(0), f(1), f'(0), and f'(1).
This function implements the algorithm presented in "Geometric Tools for Computer Graphics" by Philip Schneider and David Eberly. The cubic Hermite polynomials are given below.
The cubic interpolant is
This function simply evaluates the interpolant.