well.
In these cases, think of the grid as being defined by another time-dependent vector dataset. The vector at each
index gives the location of each grid vertex. Conceptually, the problem then reduces to one of varying and
interpolating several datasets at once.
It is usually best to interpolate the data and grid separately rather than try to do spatial interpolation on some
derived result. This is true even if the data will be resampled to another grid at a later stage in the process. For
example, consider the case of a moving projectile, where the projectile carries its own grid showing local
pressure, and this is to be resampled with a larger fixed grid showing global pressure. If the projectile moves a
significant distance between key frames, interpolating the grids and scalar values separately before combining
displays fluid motion, while interpolating after the field has been resampled will result in the appearance of
the pressure pattern fading out at the old location while fading in at the new.
Interpolation Methods
There are a number of different philosophies about performing interpolation. Traditional computer graphics
philosophy generally holds that smoother is better. In engineering analysis, it is important to remain true to
the data, and it is valuable to see the grid over which the computation was done, both temporally as well as
spatially. For many problems, a compromise is best; smoothing is done, but care is taken to avoid artifacts
which are not consistent with the data as a result of that interpolation. Linear interpolation works well in many
cases, and has the strength that is unlikely to produce wild data values. However, in some cases, linear
interpolation may produce a throbbing appearance to the animation, because the motion changes sharply at
each key frame.
For more complex motions, especially in multiple dimensions, spline curves can be used. Spline curves are
parametric polynomial curves defined by a series of control points and sometimes tangent vectors. Splines
differ in their shape, smoothness, and computational complexity. Reference [4] gives a comprehensive
information about various splines.
One important feature of a spline is whether it is guaranteed to pass through any of its control points. If so, a
series of splines can be arranged to provide smooth interpolation between time steps, guaranteeing that each
time step is accurately shown, simply by allowing certain control points to coincide with the time steps. The
Bezier form as described by Foley et. al., for example, is guaranteed to pass through two of its four control
points [14]. The other two control points are used to determine control point tangents and the smoothness of
the curve. The Hermite form is guaranteed to pass through its two control points along tangent vectors defined
at those control points.
Another important feature of a spline is its behavior between control points. The spline curve should not stray
beyond a reasonable interpolation of the data. In particular, the curve should not overshoot local minima or
maxima, because that would give a false impression of the range of the data. Consider the two splines of a
series of scalar data points shown in Figure 7.2. At the left is the strict linear interpolation between the data
points. At the center is an acceptable spline. At the right is an unacceptable spline that passes through the
control points yet exceeds the range of the data between control points. For scalar data, a good spline can be
ensured by requiring that the tangent vectors point in the direction of no change in the scalar value, or
horizontal on a value/key frame plot. This is shown by the arrows in Figure 7.2. Depending on the spline,
there may also be some constraints on the magnitude of the tangent vector to ensure uniformity and avoid
retrograde motion and looping. The Bezier form, for example, works well when the tangent vectors are
matched between subsequent spline patches to compromise on approximately one-third the distance between
key frames [36].
Figure 7.2 A comparison of linear interpolation and two splines for interpolating between data points. The
spline on the right is unacceptable because it overshoots local minima and maxima. This can be avoided by
ensuring that the tangent vectors at local minima and maxima are horizontal, as in the spline in the center.
It is easiest to interpolate the scalar data points that make up the dataset separately. When something about the
problem domain is known by the interpolation routines, this information can be used to constrain the
interpolation of several quantities. One example arises in computational fluid dynamics, where the values at
the vertices of a cell are known at the key frames, and the values in-between must be interpolated. The
individual values could be interpolated separately, but using knowledge of the conservation of mass to
constrain the interpolated values can produce better results.