Game Development Reference
In-Depth Information
Speaking of smooth animations, we just said that the curve is smooth at
k 1 and k 2 . But is it? We can see that the shape is smooth, but we've just
pointed out how there is a difference between a smooth shape and a smooth
animation. In general, we cannot tell if the animation is smooth without
knowing more about the time-to-parameter function s(t). If the shape is
not smooth, the animation will not be smooth (with one exception to be
discussed momentarily). But even if the shape is smooth, discontinuities
in s(t) can result in discontinuities in the animation. When s(t) = t, no
discontinuities are introduced by this trivial mapping, so if the tangents are
equal, the motion will be smooth.
Finally, consider a knot for which the incoming and outgoing velocities
are both zero. In this case, even though the tangents are continuous, most
people would agree that the shape is not smooth at this knot. What about
the motion? Is the motion smooth when we come to a complete stop and
then accelerate away in a potentially different direction? That will depend
on your needs.
It looks like the answer to the question “Is it smooth?” is a bit fuzzy.
This is a mathematics book, and it's really bad form to be putting quotation
marks around vague words such as “smooth.” We really need some more
precise terminology. In the context of curves, the most important smooth-
ness criteria are parametric continuity and the closely related geometric
continuity. Let's look at each of these in turn, starting with parametric
continuity, which is easier to define mathematically.
13.8.1 Parametric Continuity
A curve is said to have C n continuity if its first n derivatives are continuous.
A C 0 curve is one in which the position (the “0th derivative”) is continuous.
C 0 continuity means that we can draw a shape on a piece of paper in one
stroke without lifting our pencil, or we can move along an animation path
without “teleporting.” 19 A C 1 curve has a continuous first derivative, which
means the velocity doesn't jump instantaneously. This doesn't mean the
velocity cannot change rapidly, but it never jumps from a velocity at one
instant to a different velocity at the next instant without passing through
velocities in between. For example, the curve in Figure 13.19 forms one
connected line, so it is C 0 continuous everywhere. It is C 1 continuous
everywhere except at k 3 and k 4 , where the velocity jumps suddenly.
Higher numbers for n just mean the curve's higher-order derivatives
are continuous. A curve is C 2 if its second derivative (acceleration) is
continuous. Continuity conditions beyond C 1 are not that important for
our purposes in this topic. The lack of C 1 continuity (a sudden change in
19 Oops, there are the quotation marks that we just said were bad form in a math
book!
 
Search WWH ::




Custom Search