B-spline Curves: Definition

Given n + 1 control points p0, p1, ..., pn and a knot vector U = { u0, u1, ..., um }, the degree p B-spline curve defined by these control points and knot vector U is

where Ni,p(u)'s are B-spline basis functions of degree p. The form of a B-spline curve is very similar to that of a Bézier curve. Unlike a Bézier curve, a B-spline curve involves more information, namely: a set of control points, a knot vector, and a degree. Note that n, m and p must satisfy m = n + p + 1. More precisely, if we want to define a degree p B-spline curve with n + 1 control points, we have to supply n + p + 2 knots u0, u1, ..., un+p+1. On the other hand, if a knot vector of m + 1 knots and n + 1 control points are given, the degree of the B-spline curve is p = m - n - 1.

Although Ni,p(u) looks like Bn,i(u), the degree of B-spline basis functions is an input, while the degree of Bézier basis functions depends on the number of control points. In summary, to change the shape of a B-spline curve, one can modify one or more of these control parameters: the positions of control points, the positions of knots, and the degree of the curve.

If the knot vector does not have any particular structure, the generated curve will not touch the first and last legs of the control polyline as shown in the left figure below. This type of B-spline curves is called open B-spline curves. We may want to clamp the curve so that it is tangent to the first and the last legs just like a Bézier curve. To do so, the first knot and the last knot must be repeated p+1 times. This will generate the so-called clamped B-spline curves. See the middle figure below. By repeating some knots and control points, the generated curve can be a closed one. In this case, the start and the end of the generated curve join together forming a closed loop as shown in the right figure below. In this note, we shall use clamped curve.

The above figures have n+1 control points, where n=9 and p = 3. Then, m must be 13 so that the knot vector will contain 14 knots. To have the clamped effect, the first p+1 = 4 and the last 4 knots must be identical. The remaining 14 - (4 + 4) = 6 knots can be anywhere in the domain. In fact, the curve is generated with knot vector U = { 0, 0, 0, 0, 0.14, 0.28, 0.42, 0.57, 0.71, 0.85, 1, 1, 1, 1 }. Note that except for the first four and last four knots, the middle ones are almost uniformly spaced. The figures also show the corresponding curve segment of each knot span. In fact, the little triangles are the points on the curve that correspond to knots. Since we have only six knots not at both ends, there are six little triangles indicating the positions of the correspodning knots.

As mentioned earlier, if there is no repeated knots at both ends, the generated curve will not be tangent to the first and last legs. In this case, we should be careful about one additional restriction. In a previous page we showed an example of basis function computation using a knot vector U = { 0, 0.25, 0.5, 0.75, 1 }, where m = 4. If the basis functions are of degree 1 (i.e., p = 1), there are three basis functions N0,1(u), N1,1(u) and N2,1(u) as shown below.

Since this knot vector is not clamped, the first and the last knot spans (i.e., [0, 0.25) and [0.75, 1)) have only one non-zero basis functions while the second and the third knot spans (i.e., [0.25, 0.5) and [0.5, 0.75)) have two non-zero basis functions. Recall from the B-spline important properties that on a knot span [ui, ui+1) and degree p, there are at most p+1 degree p non-zero basis functions. Therefore, in this example, knot spans [0,0.25) and [0.75,1) do not have "full support" of basis functions. In general, for degree p, intervals [u0, up) and [un-p, un) will not have "full support" of basis functions and are ignored when the B-spline curve is open. Therefore, we have the following important note: