There are several kinds of splines, with conflicting goals:
- go near the input data points
- smooth curves vs. wiggly
For a few data points, you may want to interpolate exactly;
but for thousands of points, or even a dozen with noise,
interpolating exactly will wiggle.
Most spline fitters have parameters to tradeoff nearness of fit vs. overall smoothness.
Here's a plot of degree 1 splines (piecewise linear, connect-the-dots)
with data = line + noise.
You see that fitting the data exactly zig-zags up and down,
while maximum smoothing gives a straight line:
There are splines for different jobs, depending on
the input data and the new points in between:
tens / millions of points, how noisy, scattered / on a grid, 1d 2d 3d ...
On a regular grid in 3d for example, a spline of degree $d$
will look at $(d + 1)^3$ neighbors of each query point:
1 (nearest neighbour), 8 (trilinear), 27, 64 ... Can you afford 64 ? Do you need 64 ? It depends.
(Very briefly, B-splines smooth;
Catmull-Rom splines interpolate, e.g. frames of movies;
mixtures like 1/3 B + 2/3 CR are usefully in between.)
How does polynomial degree affect wiggliness ?
See Runge's phenomenon .
On overshoot in 1d 2d 3d ... see (ahem)
this question
on math.stackexchange.
On the dangers of EXtrapolation with splines beyond linear,
see this on SO.
See also
stackoverflow.com/questions/tagged/spline .