Cubic basis vs. Hermite interpolation

This diagram compares three cubic spline interpolation methods: B-spline (cubic basis), Hermite, and monotone Hermite. Drag the points to see how each method responds. Toggle “derivatives” to see how smooth each method is.

B-spline

B-spline interpolation treats data points as control points. It can be computed via repeated linear interpolation (De Casteljau’s algorithm), which keeps all weights in . This makes it efficient on GPUs using hardware linear filtering. See GPU Gems Chapter 20 and my notebook Bicubic Texture Interpolation using Linear Filtering.

The four basis function weights in the interval are

Hermite

Hermite interpolation passes through endpoints with a specified derivative. For 1D data, the derivative is just a finite difference of neighboring points. Unlike B-splines, some basis weights go negative, which causes overshoot. These negative weights preclude using the linear filtering trick on the GPU.

The four basis function weights in the interval are

Monotone

Monotone interpolation (as in D3’s curveMonotoneX) is a Hermite spline with clipped slopes so that local extrema only occur at the data points. It’s a compromise between B-spline (too smooth, undershoots) and Hermite (overshoots).

Update: In 2D, monotone interpolation doesn’t commute. Interpolating horizontally then vertically gives different results than vertically then horizontally. So this was a fun exercise, but monotone didn’t pan out for my use case.