Block just takes the value of the nearest sample.
Linear interpolates between the nearest samples on either side according to x_t = (1-\hat{t})x_0 + \hat{t}x_1 where x_t is the interpolated value at t and \hat{t} is the normalised parameters between the adjacent samples x_0 and x_1.
Cubic relies on four samples (the nearest two on either side) and uses a polynomial instead of a linear expression.
Huh, I’ve never used the Interpolate Data component before, but the behavior of Cubic doesn’t seem to make any sense, either by the standard algorithm (as presented in Paul Bourke’s website) or @DavidRutten’s explanation
E.g. in the screenshot below, shouldn’t the interpolated interval between t_1 and t_2 be a cubic polynomial that passes through the four sample points circled in blue? It certainly doesn’t look that way though…
Ah, would that be considered a bug or is there some other underlying logic to the interpolation?
Also, does “Catmull” (I’m assuming Catmull-Rom spline, not Catmull-Clark subdivision) use uniform, centripetal or chordal parameterization? Just curious.
Both to be perfectly accurate. But changing it now would make files using the existing algorithm behave differently. I probably won’t change it for GH1 any more. Here are the interpolation schemes that will be available in GH2:
Linear: straight interpolation between adjacent values (same as GH1)
Log-Linear: straight interpolation between adjacent values, but “straight” in a logarithmic sense. Only works on positive values.
Cubic: standard cubic interpolation, but correct unlike in GH1
Cubic Monotone: a cubic scheme which prevents any overshooting. If a sample is higher than both its immediate neighbours, the highest value on the interpolation spline is guaranteed to be at that sample.
Akima: a cubic scheme with reduces overshoots.
Equidistant Polynomial: fit a polynomial function to the samples, only works reasonably well if the samples are equi-spaced.
Neville Polynomial: more robust polynomial fitter.
Floater-Hormann: for a rational (as opposed to polynomial) function to the samples.
Bulirsch-Stoer: an early rational fitter, often yields poles within the interpolation domain where the values on either side go to infinity.
There’s also a Fourier transform, which can be used as an interpolation scheme. It has an interesting feature that it is a cyclical interpolation, meaning the pattern repeats smoothly all along the x-axis. The samples are necessarily equi-spaced with this scheme.
I also added a Blend Curve interpolation which assumes a constant value before and after the first and last grips. It also supports various interpolation schemes including cosine, smooth, smoother (degree=5) and smoothest (degree=7):