Since NURBS curves are defined by a set of control points, a knot vector, a degree and a set of weights, we have one more parameter for shape modification (i.e., the weights). Recall that the basis functions of a NURBS curve is
Therefore, increasing and decreasing the value of w_{i} will increase and decrease the value of R_{i,p}(u), respectively. More precisely, increasing the value of w_{i} will pull the curve toward control point P_{i}. In fact, all affected points on the curve will also be pulled in the direction to P_{i}. When w_{i} approaches infinity, the curve will pass through control point P_{i}. On the other hand, decreasing the value of w_{i} will push the curve away from control point P_{i}. Click here for an in-depth discussion.
The following figures show a NURBS curve of degree 6 and its NURBS basis functions. The selected control point is P_{9}. In the first figure, all weights are 1's and the curve is a B-spline curve. In the second one, w_{9} is increased to 2 and, as you can see, a portion of the curve moves toward P_{9}. Since w_{9} is increased, so does R_{9,6}(u) as shown in the right figure.
In the following, w_{9} is further increased to 5, 10 and 20, the corresponding R_{9,6}(u) becomes larger, and carries more weight. This pulls the curve further to control point P_{9}. When w_{9} = 20, the curve is very close to P_{9}.
Let us take a look at the opposite effect. The following is the initial case where all weights are 1's. Then, w_{9} is decreased to 0.5 and this pushes the curve away from control point P_{9}. Note that the corresponding R_{9,6}(u) decreases and so does the impact of control point P_{9} on the curve C(u). When w_{9} changes to 0.1, the curve is moved further away and the value of R_{9,6}(u) is smaller. The last figure shows the curve of w_{9} being zero. Since R_{9,6}(u) is zero, it has no impact on the curve and, as a result, the curve segment opposite to control point P_{9} is almost flat.
In summary, we have the following:
Increasing (resp., decreasing) the value of weight w_{i} pulls (resp., pushes) the curve toward (resp., away from) control point P_{i}. When the value of w_{i} becomes infinity, the curve passes through control point P_{i} and when w_{i} is zero, control point P_{i} has no impact on the curve.
Let us be more precise about the impact of changing the weight of a selected control point. To this end, let us return to the definition of NURBS curves:
Let us select control point P_{k} and investigate the impact of changing w_{k}. Since P_{k} can only contribute to the curve C(u) on the non-zero domain of its coefficient N_{k,p}(u) (i.e., [u_{k}, u_{k+p+1})), in what follows, we assume u is in [u_{k}, u_{k+p+1}).
Taking the terms involving w_{k} out of the summations yields the following:
Because this equation is quite complex, we shall simplify it with the following:
Then, the equation becomes the following easy-to-read one:
Consider the case of w_{k} = 0 first. We have A = 0 and the point on curve, denoted as C^{0}(u), is
Now let us calculate the vector from this "base" point C^{0}(u) to its corresponding point C(u) for an arbitrary w_{k}. Some simple manipulations yield the following:
What does this mean? It means vector C(u)-C^{0}(u) and vector C_{k}-C^{0}(u) have the same direction, and the length of the former is A/(A+B) times that of the latter for every u in [u_{k}, u_{k+p+1})! Because points C_{k} and C^{0}(u) are fixed, we can say that C(u) lies on the line of P_{k} and C^{0}(u). Moreover, if all weights are non-negative, A and B are both non-negative and the value of A/(A+B) lies between 0 and 1! That is, point C(u) lies on the line segment of P_{k} and C^{0}(u).
What if w_{k} approaches infinity? Let us divide the numerator and denominator of the curve C(u) by w_{k} as shown below.
If w_{k} approaches infinity, 1/w_{k} approaches zero. Hence, if w_{k} approaches infinity, P(u) approaches P_{k}, the selected control point. The following summarizes what we have so far:
If w_{k} is non-negative, C(u) always lies on the line segment of C^{0}(u) and P_{k}, where C^{0}(u) is the point corresponding to w_{k} = 0, and u is in [u_{k}, u_{k+p+1}). Moreover, when w_{k} changes from 0 to infinity, C(u) moves from C^{0}(u) to P_{k}, and if w_{k} is infinity, C(u) becomes C_{k}. |
The following figure illustrates this result. We have a NURBS curve of degree 6 defined by 9 control points (n = 8) and 16 knots (m = 15) as shown below.
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} = u_{15} |
0 | 1/3 | 2/3 | 1 |
The selected control point is P_{4}. Since the coefficient of P_{4}, N_{4,6}(u), is non-zero on [u_{4}, u_{4+6+1}) = [0,1), changing w_{4} affects the entire curve!
The points that correspond to u = 1/3 and u = 2/3 are marked on the curve in different colors. The curve corresponding to w_{4} = 0 is the lowest one marked with a 0. The figure shows the curves of w_{4} being 2, 3, 4, 5, 10, 20 and 50. As the value of w_{4} increases, the curve is pulled toward control point P_{4}. When w_{4} is increased to 50, the curve becomes very close to P_{4}. Note that all points that correspond to C(1/3) are on the line segment C^{0}(1/3) and P_{4}, and all points that correspond to C(2/3) are on line segment C^{0}(2/3) and P_{4}. Note also that the curve segment between C(1/3) and C(2/3) gets shorter as the value of w_{4} increases. Eventually, the length of this curve segment becomes zero (i.e., C(1/3) and C(2/3) become identical to P_{4}) when w_{4} is infinity. Can you generalize this finding?