Graphics Reference
In-Depth Information
3.1.2 Summary
There are many formulations that can be used to interpolate values. The specific formulation chosen
depends on the desired continuity, whether local control is needed, the degree of computational com-
plexity involved, and the information required from the user. The Catmull-Rom spline is often used in
creating a path through space because it is an interpolating spline and requires no additional informa-
tion from the user other than the points that the path is to pass through. Bezier curves that are con-
strained to pass through given points are also often used. Parabolic blending is an often overlooked
technique that also affords local control and is interpolating. Formulations for these curves appear
in Appendix B.5 . See Mortenson [ 5 ] and Rogers and Adams [ 6 ] for more in-depth discussions.
3.2 Controlling the motion of a point along a curve
Designing the shape of a curve is only the first step in creating an animation path. The speed at which
the curve is traced out as the parametric value is increased has to be under the direct control of the
animator to produce predictable results. If the relationship between a change in parametric value
and the corresponding distance along the curve is not known, then it becomes much more difficult
for the animator to produce desired effects. The first step in giving the animator control is to establish
a method for stepping along the curve in equal increments. Once this is done, methods for speeding up
and slowing down along the curve can be made available to the animator.
For this discussion, it is assumed that an interpolating technique has been chosen and that a function
P
( u ) has been selected that, for a given value of u , will produce a value that is a point in space, that is,
p ¼ P
( u ). Such vector valued functions will be shown in bold. Because a position in three-dimensional
space is being interpolated,
( u ) can be considered to represent three functions. The x -, y -, and z -
coordinates for the positions at the key frames are specified by the user. Key frames are associated
with specific values of the time parameter, u . The x -, y -, and z -coordinates are considered independently
so that, for example, the x -coordinates of the points are used as control values for the interpolating
curve so that X ¼ P x ( u ), where P x denotes an interpolating function; the subscript x is used to denote
that this specific curve was formed using the x -coordinates of the key positions. Similarly, Y ¼ P y ( u )
and Z ¼ P z ( u ) are formed so that for any specified time, u , a position ( X , Y , Z ) can be produced as ( P x ( u ),
P y ( u ), P z ( u ))
P
( u ).
It is very important to note that varying the parameter of interpolation (in this case u ) by a constant
amount does not mean that the resulting values (in this case Euclidean position) will vary by a constant
amount. Thus, if positions are being interpolated by varying u at a constant rate, the positions that are
generated will not necessarily, in fact will seldom, represent a constant speed (e.g., see Figure 3.4 ) .
To ensure a constant speed for the interpolated value, the interpolating function has to be param-
eterized by arc length , that is, distance along the curve of interpolation. Some type of reparameteriza-
tion by arc length should be performed for most applications. Usually this reparameterization can be
approximated without adding undue overhead or complexity to the interpolating function.
Three approaches to establishing the reparameterization by arc length are discussed here. One
approach is to analytically compute arc length. Unfortunately, many curve formulations useful in ani-
mation do not lend themselves to the analytic method, so numeric methods must be applied. Two
numeric methods are presented, both of which create a table of values to establish a relationship
between parametric value and approximate arc length. This table can then be used to approximate
¼ P
Search WWH ::




Custom Search