B-spline Curves: Moving Control Points

Moving control points is the most obvious way of changing the shape of a B-spline curve. The local modification scheme discussed in an earlier page states that changing the position of control point pi only affects the curve p(u) on interval [ui, ui+p+1), where p is the degree of the B-spline curve. In fact, the shape change is translational in the direction of the control point being moved. More precisely, if control point pi is moved in certain direction to a new position qi, then point p(u), where u is in [ui, ui+p+1), will be moved in the same direction from pi to qi. However, the distance moved is different from point to point.

In the following figures, control point p4 is moved from the position in the left figure to a new position in the middle figure and finally to the its final position in right figure. As you can see those points corresponding to knots (marked with little triangles) are moved in the same direction.

Some Useful Consequences from the Strong Convex Hull Property

Recall from the strong convex hull property that if u lies in [ui,ui+1), then p(u) lies in the convex hull defined by control points pi, pi-1, ..., pi-p+1, pi-p. This will help us to perform the following design tasks:
  1. Force a curve segment to become a line segment: let p+1 adjacent control points be collinear
    If u lies in knot span [ui,ui+1), then p(u) lies in the convex hull defined by p+1 control points pi, pi-1, ..., pi-p+1, pi-p. Since this is true for all u in that span, the curve segment on this knot span lies entirely in this convex hull. If all of these p+1 control points are collinear (i.e., on a straight line), the convex hull collapses to a line segment and so does the curve segment it contains. As a result, the curve segment on knot span [ui,ui+1) becomes a line segment. Note that in this case only this curve segment becomes a line segment. Other curve segments are still non-linear.

    Let us take a look at an example. Figures above are defined by n = 15 (i.e., 16 control points), p = 3 (degree 3) and m = 19 (i.e., 20 knots). Note that the first four and last four knots are clamped. The left figure on the top row is a given B-spline curve. Let us make p9, p8, p7 and p6 collinear. Therefore, the curve segment on [u9,u10) lies in the convex hull defined by p9, p8, p7 and p6. Since this convex hull is a line segment, the curve segment must also be a line segment. Keep in mind that the first four knots are clamped and hence the first three knot spans do not exists. Since [u9,u10) is the seventh knot span, the seventh segment collapses to the line segment p7p8. This is illustrated by the second and third figures of the top row and the left figure of the bottom row.

    But, why is the curve segment on [u9,u10) the only collapsed curve segment? Look at the second figure on the top row. The shaded area is the convex hull just before u enters [u9,u10). This convex hull is defined by control points p8, p7, p6 and p5, which is still not a line segment yet. Once u enters [u9,u10), the curve segment collapses (the third figure on the top row). Immediately after u leaving [u9,u10), a new convex hull appears (first figure on the bottom row).

    The second figure on the bottom row has p5 collinear with its four successors. You see the curve contains one more line segment. The third figure on the bottom row has p10 collinear with its five predecessors; however, it is moved to a position between p8 and p9. This would make part of the corresponding curve segment a straight line (why?)

  2. Force a B-spline curve to pass a control point: let p adjacent control points be identical
    Consider control pi. Since the curve segment on knot span [ui, ui+1) lies entirely in the convex hull defined by pi, ..., pi-p+1,pi-p, if we make the first p control point identical (i.e., pi = pi-1 = ... = pi-p+1), the convex hull collapse to a line segment pi-ppi and the curve must pass pi.

    The curve in the left figure above is of degree 3. If p5 is moved and made identical with p6, the curve is moved closer to p6 but not passing though it yet. This is shown in the middle figure. Note that the number of curve segments is not changed due to this move; however, the little triangle marker near to p5 is move closer to p6.

    If p4 is moved and made identical to p6 = p5, the curve passes through p6 and the point that corresponds to a knot becomes identical to control point p4 due to this move.

  3. Force a B-spline curve tangent to a leg of control polyline: let pi-p, pi-p+1 = pi-p+2 = .... = pi-1 = pi and pi+1 be collinear
    In the above, p adjacent control points are made identical. At that control point, the continuity is C0 because the curve has a cusp (see the right figure above). However, since with all simple knots a B-spline curve is Cp-1 at the knots and infinitely differentiable at other places, the curve is Cp-1 continuous at control point pi (the collapsed control point renumbered to i) on leg pi-ppi and is also Cp-1 continuous at control point pi on leg pipi+1. Therefore, if we make control points pi-p, pi and pi+1 collinear, as long as the two adjacent curve segments do not have a cusp at the knot, they are Cp-1 continuous at pi.

    In the above figure figures, the curve is of degree 2. If we make control points 2, 3, 4 and 5 collinear and 3 and 4 identical, we have the right figure. The collinearity makes sure the curve segment lies on the line while the identical control points enforce the C3-1 = C2 continuous.