# Natural Cubic splines

This applet shows the natural cubic spline through a sequence of control points.

You can move a control point by dragging it with the mouse, add a new one by clicking the mouse, and delete one by holding down the Shift key while clicking on it.

Between each pair of control points there is a cubic curve. To make sure that curves join together smoothly, the first and second derivative at the end of one curve must equal the the first and second derivative start of the next one. Computing the natural cubic spline essentially involves solving a system of simultaneous equations to make sure this happens. It is also possible to create a closed natural cubic spline.

Unfortunately, while the curve is mathematically smooth, it can wriggle in quite unexpected ways (try moving one control point close to another one in the applet above). Furthermore, we do not have local control - moving one control point causs the entire curve to change, not just the part near the control point.

Contents
lambert@cse.unsw.edu.au