Game Development Reference
In-Depth Information
Although our curve does pass through the control points, it isn't really the
curve we wanted. If we compare the curve on the right side of Figure 13.4
with the curve we set out to create at the start of this section in Fig-
ure 13.2, we see that the curve produced by Aitken's algorithm overshoots
the y value of the two middle control points. We have discovered an incon-
venient truth. 2
Polynomial interpolation doesn't really give us the type of control we want
for curve design in geometric settings.
But don't despair! We've learned several important ideas that will be
helpful when we discuss Bezier curves in Section 13.4 and splines in Sec-
tion 13.6. In fact, we're going to beg your patience to allow us to extend
the discussion on polynomial interpolation just a bit further. It's sort of
like watching the movie Titanic; even though you know that the journey
will end tragically, you still might find something useful along the way. We
promise that the other techniques in this chapter will have practical as well
as educational value.
By the way, you might have noticed that we didn't actually compute
the polynomial P that produces the curve. Working through this math
is straightforward, but a bit tedious and not all that enlightening. The
important point is that Aitken's algorithm is a recursive process of blending
curves together and works by repeated linear interpolation. Besides, why
bother with the details when we have computers to solve algebra problems
for us? 3 However, you needn't feel short-changed by lazy authors. If you
really want to know what the polynomial is (or just want to feel like you're
getting your money's worth), keep reading. We'll discover it in the next
section by using a different method that's less tedious mathematically.
13.2.2 Lagrange Basis Polynomials
Section 13.2.1 applied geometric intuition to the problem of polynomial
interpolation and came up with Aitken's algorithm. Now we approach the
subject from a more abstract mathematical point of view.
One mathematical approach to the interpolation problem comes from
linear algebra. 4
Each control point gives us one equation, and each coe -
2 Aitken's Al Gore rhythm, if you will.
3 Don't try this excuse with your professor, but it's been known to work in job inter-
views.
4 We're talking about real linear algebra, not the geometry-focused subset of it we
study in this topic.
 
Search WWH ::




Custom Search