Game Development Reference
In-Depth Information
We use the word basis in basis polynomial to emphasize the fact that we
can use these polynomials as building blocks to reconstruct absolutely any
polynomial whatsoever, given the values of the polynomial at the knots. It's
the same basic concept as a basis vector (see Section 3.3.3): any arbitrary
vector can be described as a linear combination of the basis vectors. In our
case, the space being spanned by the basis is not a geometric 3D space,
but the vector space of all possible polynomials of a certain degree, and the
scale values for each curve are the known values of the polynomial at the
knots.
But there's an alternate way to understand the multiplication and sum-
ming that's going on. Instead of thinking about the polynomials as the
building blocks and the control points as the scale factors, we can view
each point on the curve as a result of taking a weighted average of the con-
trol points, where the basis polynomials provide the blending weights. So
the control points are the building blocks and the basis polynomials provide
the scale factors, although we prefer to be more specific and call these scale
factors barycentric coordinates. We introduced barycentric coordinates in
the context of triangles in Section 9.6.3, but the term refers to a general
technique of describing some value as a weighted average of data points.
We can think of basis polynomials as functions yielding barycentric coor-
dinates (blending weights).
Notice that some values are negative or greater than 1 on certain in-
tervals, which explains why direct polynomial interpolation overshoots the
control points. When all barycentric coordinates are inside the [0,1] range,
the resulting point is guaranteed to lie inside the convex hull of the con-
trol points. (The convex hull is the smallest polygon that contains all the
control points. It “shrink wraps” the control points, sort of like if you were
to stretch a rubber band around the control points and then release it.)
But when we have any one coordinate outside this interval, the resulting
point could extend outside the convex hull. For purposes of geometric curve
design, the convex hull guarantee is a very nice one to have. Section 13.4
shows that Bezier curves do provide this guarantee through the Bernstein
basis.
13.2.3 Polynomial Interpolation Summary
We've approached polynomial interpolation from two perspectives. Aitken's
algorithm is a geometric approach based on repeated linear interpolation,
Search WWH ::




Custom Search