Game Development Reference
In-Depth Information
Smoothstep is Your Friend
The Hermite basis function H 3 (t) is also known as the smoothstep function.
Almost any transition based on linear interpolation, especially a camera
transition, feels better when replaced with the smoothstep function.
One final word about Hermite curves. Like the other forms for polyno-
mial curves, it's possible to design a scheme for Hermite curves of higher
degree, although the cubic polynomial is the most commonly used in com-
puter graphics and animation. With the cubic spline, we specified the
position (the “0th” derivative) and velocities (first derivatives) at the end
points. A quintic (fifth-degree) Hermite curve happens when we also specify
the accelerations (second derivatives).
13.4
B ezier Curves
This chapter has so far discussed a number of ideas about curves that were
enlightening, but it has yet to describe a fully practical way to design a
curve. All of that will change in this section. 10 Bezier curves were invented
by Pierre Bezier (1910-1999), a French 11 engineer, while he was working
for the automaker Renault. Bezier curves have many desirable properties
that make them well suited for curve design. Importantly, Bezier curves
approximate rather than interpolate: although they do pass through the
first and last control points, they only pass near the interior points. For
this reason, the Bezier control points are called “control points” rather than
“knots.” Some example cubic Bezier curves are shown in Figure 13.10.
Recall from Section 13.2 that the problem of polynomial interpolation
had two solutions that produced the same result. Aitken's algorithm was a
recursive construction technique that appealed to our geometric sensibili-
ties, and a more abstract approach yielded the Lagrange basis polynomials.
Bezier curves exhibit a similar duality. The counterpart of Aitken's algo-
rithm for Bezier curves is the de Casteljau algorithm, a recursive geometric
technique for constructing Bezier curves through repeated linear interpola-
tion; this is the subject of Section 13.4.1. The analog to the Lagrange basis
is the Bernstein basis, which is discussed in Section 13.4.2. After consider-
10 Well, just some of that is going to change—we hope your reading will still be en-
lightening. You know what we mean.
11 See, we told you a lot of these guys were French! By the way, it's pronounced
“BEZ-ee-ay.”
 
Search WWH ::




Custom Search