Hermite Interpolation.

Functions

template<typename T >
hermiteInterpolate (T t, T value0, T value1, T derivative0, T derivative1)
 Hermite interpolation.

Function Documentation

template<typename T >
T hermiteInterpolate ( t,
value0,
value1,
derivative0,
derivative1 
) [inline]

Hermite interpolation.

Parameters:
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.

\[ a_0(t) = 2 t^3 - 3 t^2 + 1 \]

\[ a_1(t) = -2 t^3 + 3 t^2 \]

\[ b_0(t) = t^3 - 2 t^2 + t \]

\[ b_1(t) = t^3 - t^2 \]

The cubic interpolant is

\[ c(t) = f(0) a_0(t) + f(1) a_1(t) + f'(0) b_0(t) + f'(1) b_1(t). \]

This function simply evaluates the interpolant.

Returns:
The interpolated value of the function.
Note:
Using this function is not efficient when one is evaluating a fixed interpolant for multiple arguments. For this usage scenario, use a divided differences algorithm instead.
Generated on Thu Jun 30 02:15:00 2016 for Numerical Algorithms Package by  doxygen 1.6.3