Fast and simple cubic spline interpolant.
It was derived from a Hermitian construction setting the first derivative at each sample position to the linear slope between neighboring positions over their parameter interval.
const interpolant = new CubicInterpolant(new Float32Array( 2 ),new Float32Array( 2 ),1,new Float32Array( 1 ));interpolant.evaluate( 0.5 );
Create a new instance.
array of positions
array of samples
number of samples
Optional
buffer to store the interpolation results.
Evaluate the interpolant at position t.
An array
time
Fast and simple cubic spline interpolant.
It was derived from a Hermitian construction setting the first derivative at each sample position to the linear slope between neighboring positions over their parameter interval.
Examples