Graphics Reference
In-Depth Information
The procedure can be made more efficient if the points are generated in order according to
binary subdivision (1/2, 1/4, 3/4, 1/8, 3/8, 5/8, 7/8, 1/16,
) and temporary values are saved for
...
use in subsequent calculations.
3.4 Working with paths
3.4.1 Path following
Animating an object by moving it along a path is a very common technique and usually one of the
simplest to implement. As with most other types of animation, however, issues may arise that make
the task more complicated than first envisioned. An object (or camera) following a path requires more
than just translating along a space curve, even if the curve is parameterized by arc length and the speed
is controlled using ease-in/ease-out. Changing the orientation of the object also has to be taken into
consideration. If the path is the result of a digitization process, then often it must be smoothed before
it can be used. If the path is constrained to lie on the surface of another object or needs to avoid other
objects, then more computation is involved. These issues are discussed below.
3.4.2 Orientation along a path
Typically, a local coordinate system ( u , v , w ) is defined for an object to be animated. In this discussion,
a right-handed coordinate system is assumed, with the origin of the coordinate system determined by a
point along the path
( s ). As previously discussed, this point is generated based on the frame number,
arc length parameterization, and possibly ease-in/ease-out control. This position will be referred to as
POS . The direction the object is facing is identified with the w -axis, the up vector is identified with the
v -axis, and the local u -axis is perpendicular to these two, completing the coordinate system. To form a
right-handed coordinate system, for example, the u -axis points to the left of the object as someone at the
object's position ( POS ) looks down the w -axis with the head aligned with the v -axis ( Figure 3.30 ).
There are various ways to handle the orientation of the camera as it travels along a path. Of course,
which method to use depends on the desired effect of the animation. The orientation is specified by
determining the direction it is pointing (the w -axis) and the direction of its up vector (the v -axis);
the u -axis is then fully specified by completing the left-handed camera coordinate system (eye space).
P
v
w
u
P ( s )
POS
FIGURE 3.30
Object-based, right-handed, local coordinate system.
 
Search WWH ::




Custom Search