B-spline curves share many important properties with Bézier curves, because the former is a generalization of the later. Moreover, B-spline curves have more desired properties than Bézier curves. The list below shows some of the most important properties of B-spline curves.
In the following we shall assume a B-spline curve C(u) of degree p is defined by n + 1 control points and a knot vector U = { u0, u1, ...., um } with the first p+1 and last p+1 knots "clamped" (i.e., u0 = u1 = ... = up and um-p = um-p+1 = ... = um).
This nice property allows us to design complex shapes with lower degree polynomials. For example, the right figure below shows a Bézier curve with the same set of control points. It still cannot follow the control polyline nicely even though its degree is 10!
In general, the lower the degree, the closer a B-spline curve follows its control polyline. The following figures all use the same control polyline and knots are clamped and uniformly spaced. The first figure has degree 7, the middle one has degree 5 and the right figure has degree 3. Therefore, as the degree decreases, the generated B-spline curve moves closer to its control polyline.
The above two B-spline curves have 11 control points (i.e., n = 10), degree 3 (i.e., p=3) and 15 knots (m = 14) with first four and last four knots clamped. Therefore, the number of knot spans is equal to the number curve segments. The knot vector is
u0 | u1 | u2 | u3 | u4 | u5 | u6 | u7 | u8 | u9 | u10 | u11 | u12 | u13 | u14 |
0 | 0 | 0 | 0 | 0.12 | 0.25 | 0.37 | 0.5 | 0.62 | 0.75 | 0.87 | 1 | 1 | 1 | 1 |
The left figure has u in knot span [u4, u5) = [0.12,0.25) and the corresponding point (i.e. C(u)) in the second curve segment. Therefore, there are p+1 = 4 basis functions non-zero on this knot span (i.e., N4,3(u), N3,3(u), N2,3(u) and N1,3(u) ) and the corresponding control points are P4, P3, P2 and P1. The shaded area is the convex hull defined by these four points. It is clear that C(u) lies in this convex hull.
The B-spline curve in the right figure is defined the same way. However, u is in [u9, u10) = [0.75,0.87) and the non-zero basis functions are N9,3(u), N8,3(u), N7,3(u) and N6,3(u). The corresponding control points are P9, P8, P7 and P6.
Consequently, as u moves from 0 to 1 and crosses a knot, a basis functions becomes zero and a new non-zero basis function becomes effective. As a result, one control point whose coefficient becomes zero will leave the the definition of the current convex hull and is replaced with a new control point whose coefficient becomes non-zero.
The above B-spline curves are defined with the same parameters as in the previous convex hull example. We intent to move control point P2. The coefficient of this control point is N2,3(u) and the interval on which this coefficient is non-zero is [u2, u2+3+1) = [u2, u6) = [0,0.37). Since u2 = u3 = 0, only three segments that correspond to [u3, u4) (the domain of the first curve segment), [u4, u5) (the domain of the second curve segment) and [u5, u6) (the domain of the third curve segment) will be affected. The right figure shows the result of moving P2 to the lower right corner. As you can see, only the first, second and third curve segments change their shapes and all remaining curve segments stay in their original place without any change.
This local modification scheme is very important to curve design, because we can modify a curve locally without changing the shape in a global way. This will be elaborated on the moeing control point page. Moreover, if fine-tuning curve shape is required, one can insert more knots (and therefore more control points) so that the affected area could be restricted to a very narrow region. We shall talk about knot insertion later.
The above B-spline curve has 18 control points (i.e., n = 17), degree 4, and the following clamped knot vector
u0 to u4 | u5 | u6 and u7 | u8 | u9 to u11 | u12 | u13 to u16 | u17 | u18 to u22 |
0 | 0.125 | 0.25 | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 1 |
Thus, u6 is a double knot, u9 is a triple knot and u13 is a quadruple knot. Consequently, C(u) is of C4 continuous at any point that is not a knot, C3 continuous at all simple knots, C2 continuous at u6, C1 continuous at u9, C0 continuous at u13.
All points on the curve that correspond to knots are marked with little triangles. Those corresponding to multiple knots are further marked with circles and their multiplicities. It is very difficult to visualize the difference between C4, C 3 and even C2 continuity. For the C1 case, the corresponding point lies on a leg, while the C0 case forces the curve to pass through a control point. We shall return to this issue later when discussing modifying knots.
In the above figure, the blue line intersects both the control polyline and the B-spline curve 6 times, while the yellow line also intersects the control polyline and the B-spline curve 5 times. However, the orange line intersects the control polyline 6 times and the curve 4 times.
However, keep in mind that B-spline curves are still polynomial curves and polynomial curves cannot represent many useful simple curves such as circles and ellipses. Thus, a generalization of B-spline, NURBS, is required. We will discuss NURBS later.