This Demonstration illustrates the relation between B-spline curves and their knot vectors. Start with the control points and a knot vector , where the degree of the B-spline is . The knot vector satisfies and . The B-spline basis functions are defined as:

,

and a B-spline curve is defined as:

.

For nonperiodic B-splines, the first knots are equal to 0 and the last knots are equal to 1. If duplication happens at the other knots, the curve becomes times differentiable. So, by overlapping the knots, you can generate a curve with sharp turns or even discontinuities.

When the number of control points is , the basis functions are reduced to Bernstein polynomial, thus the curve becomes a Bézier curve.

Red points indicate the knot points on the curve. Hold down the Alt key and click to add new control points (up to 12). Changes in degree and number of control points will cause the knot vector to be recomputed.

Choose "view basis functions" to show the B-spline basis functions of a given knot vector instead of the B-spline curve.