Graphics Reference
In-Depth Information
CHAPTER
3
Interpolating Values
This chapter presents the foundation upon which much of computer animation is built—that of inter-
polating values. Changing values over time that somehow affect the visuals produced is, essentially,
animation. Interpolation implies that the boundary values have been specified and all that remains is to
fill in the intermediate details. But even filling in the values requires skill and knowledge. This chapter
starts by presenting the basics of various types of interpolating and approximating curves followed
by techniques to control the motion of a point along a curve. The interpolation of orientation is then
considered. The chapter concludes with a section on working with paths.
3.1 Interpolation
The foundation of most computer animation is the interpolation of values. One of the simplest exam-
ples of animation is the interpolation of the position of a point in space. But even to do this correctly is
nontrivial and requires some discussion of several issues: the appropriate interpolating function, the
parameterization of the function based on distance traveled, and maintaining the desired control of
the interpolated position over time.
Most of this discussion will be in terms of interpolating spatial values. The reader should keep in
mind that any changeable value involved in the animation (and display) process such as an object's
transparency, the camera's focal length, or the color of a light source could be subjected to interpolation
over time.
Often, an animator has a list of values associated with a given parameter at specific frames (called
key frames or extremes ) of the animation. The question to be answered is how best to generate the
values of the parameter for frames between the key frames. The parameter to be interpolated may
be a coordinate of the position of an object, a joint angle of an appendage of a robot, the transparency
attribute of an object, or any other parameter used in the manipulation and display of computer graphics
elements. Whatever the case, values for the parameter of interest must be generated for all of the frames
between the key frames.
For example, if the animator wants the position of an object to be (
5, 0, 0) at frame 22 and the
position to be (5, 0, 0) at frame 67, then values for the position need to be generated for frames 23 to 66.
Linear interpolation could be used. But what if the object should appear to be stopped at frame 22 and
needs to accelerate from that position, reach a maximum speed by frame 34, start to decelerate at frame
50, and come to a stop by frame 67? Or perhaps instead of stopping at frame 67, the object should
continue to position (5, 10, 0) and arrive there at frame 80 by following a nice curved path. The next
Search WWH ::




Custom Search