Learning about splines

Sometimes I make applets just because I want a simple visual explanation of something, like why computer spline curves are smooth everywhere (ie: why they don't suddenly bend up or down).

At the right is a Bspline. When you slide the black dots up or down, you change the spline curve, shown in black.

You can see the derivative (velocity) curve in blue, and the second derivative (acceleration) in red. No matter how you vary the black curve, the red curve is everywhere continuous (ie: it never suddenly jumps to a higher or lower value).

In other words, the spline curve (the one in black) always accelerates continuously, the way a car does when you're driving. Which is why it's always smooth, with no kinks in it.

Now you can also see the secret recipe for making spline curves: first make an acceleration curve by connecting together a bunch of straight lines. You can then get the spline curve from that.

- Ken Perlin

source: bspline extends BufferedApplet