i
i
i
i
i
i
i
i
15.4. Putting Pieces Together 357
where the function b
1
(u) is defined as
b
1
(u)=
1 − 2u if 0 ≤ u<
1
2
,
0otherwise,
and b
2
and b
3
are defined similarly. These functions are plotted in Figure 15.4(b).
The knots of a polynomial function are the combination of the knots of all of
the pieces that are used to create it. The knot vector is a vector that stores all of
the knot values in ascending order.
Notice that in this section we have used two different mechanisms for combin-
ing polynomial pieces: using independent polynomial pieces for different ranges
of the parameter and blending together piecewise polynomial functions.
15.4.2 Using Independent Pieces
In Section 15.3, we defined pieces of polynomials over the unit parameter range.
If we want to assemble these pieces, we need to convert from the parameter of the
overall function to the value of the parameter for the piece. The simplest way to
do this is to define the overall curve over the parameter range [0,n] where n is the
number of segments. Depending on the value of the parameter, we can shift it to
the required range.
15.4.3 Putting Segments Together
If we want to make a single curve from two line segments, we need to make sure
that the end of the first line segment is at the same location as the beginning of the
next. There are three ways to connect the two segments (in order of simplicity):
1. Represent the line segment as its two endpoints, and then use the same point
for both. We call this a shared-point scheme.
2. Copy the value of the end of the first segment to the beginning of the second
segment every time that the parameters of the first segment change. We call
this a dependency scheme.
3. Write an explicit equation for the connection, and enforce it through nu-
merical methods as the other parameters are changed.
While the simpler schemes are preferable since they require less work, they also
place more restrictions on the way the line segments are parameterized. For ex-
ample, if we want to use the center of the line segment as a parameter (so that the