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. This page lists some of the most important properties of B-spline. We shall only concentrate on clamped B-spline curves here.
In the following we shall assume a B-spline curve p(u) of degree p is defined by n + 1 control points, knot vector U = { u_{0}, u_{1}, ...., u_{m} } with the first p+1 and last p+1 knots "clamped" (i.e., u_{0} = u_{1} = ... = u_{p} and u_{m-p} = u_{m-p+1} = ... = u_{m}).
This nice property allows us to design very complicated 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 polygon 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 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
u_{0} | u_{1} | u_{2} | u_{3} | u_{4} | u_{5} | u_{6} | u_{7} | u_{8} | u_{9} | u_{10} | u_{11} | u_{12} | u_{13} | u_{14} |
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 [u_{4}, u_{5}) = [0.12,0.25) and the corresponding point (i.e. p(u)) in the second curve segment. Therefore, there are p+1 = 4 basis functions non-zero on this knot span (i.e., N_{4,3}(u), N_{3,3}(u), N_{2,3}(u) and N_{1,3}(u) ) and the corresponding control points are p_{4}, p_{3}, p_{2} and p_{1}. The shaded area is the convex hull defined by these four points. It is clear that p(u) lies in this convex hull.
The B-spline curve in the right figure is defined the same way. However, u is in [u_{9}, u_{10}) = [0.75,0.87) and the non-zero basis functions are N_{9,3}(u), N_{8,3}(u), N_{7,3}(u) and N_{6,3}(u). The corresponding control points are p_{9}, p_{8}, p_{7} and p_{6}.
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-splines are defined with the same parameters as in the previous convex hull example. We intent to move control point p_{2}. The coefficient of this control point is N_{2,3}(u) and the interval on which this coefficient is non-zero is [u_{2}, u_{2+3+1}) = [u_{2}, u_{6}) = [0,0.37). Since u_{2} = u_{3} = 0, only three segments that corresponds to [u_{3}, u_{4}) (the domain of the first curve segment), [u_{4}, u_{5}) (the domain of the second curve segment) and [u_{5}, u_{6}) (the domain of the third curve segment) will be affected. The right figure shows the result of moving p_{2} 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. 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
u_{0} to u_{4} | u_{5} | u_{6} and u_{7} | u_{8} | u_{9} to u_{11} | u_{12} | u_{13} to u_{16} | u_{17} | u_{18} to u_{22} |
0 | 0.125 | 0.25 | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 1 |
Thus, u_{6} is a double knot, u_{9} is a triple knot and u_{13} is a quadruple knot. Consequently, p(u) is of C^{4} continuous at any point that is not a knot, C^{3} continuous at all simple knots, C^{2} continuous at u_{6}, C^{1} continuous at u_{9}, C^{0} continuous at u_{13}.
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 C^{4}, C ^{3} and even C^{2} continuity. For the C^{1} case, the the corresponding point lies on a leg, while the C^{0} 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 curves such as circles and ellipses. Thus, a generalization of B-spline, NURBS, is required. We will discuss NURBS later.