Interpolating Splines With Local Tension, Continuity, and Bias Control
Interpolating Splines With Local Tension, Continuity, and Bias Control
Richard H. Bartels
Computer Graphics Laboratory
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1
(519) 886-1351
Abstract 1. Introduction
This paper presents a new method for using cubic interpolating One of the oldest techniques used in computer animation is
splines in a key frame animation system. Three control the automatic generation of inbetweens (intermediate frames)
parameters allow the animator to change the tension, continuity, based on a set of key frames supplied by the animator [5]. This
and bias of the splines. Each of these three parameters can be same principle is frequently used in computer assisted 3-D
used for either local or global control. Our technique produces animation where camera and object positions are defined only at
a very general class of interpolating cubic splines which includes key points in the animation, leaving the calculation of
the cardinal splines as a proper subset. intermediate positions to the computer. The straightforward
linear interpolation algorithm used in many systems produces
CR Categories and Subject Descriptors: G.I.1 [Nume~'ieal some undesirable side effects which give the animation a
Analysis]: Interpolation - spline and piecewise polynomial mechanical look, often referred to as the "computer signature."
interpolation; 1 . 3 . 5 [Computer Graphics]: Computational The most objectionable characteristic of this type of animation
Geometry and Object Modeling - curve, surface, solid and is the lack of smoothness in the motion. The key frames may be
object representations; 1.3.7 [Computer Graphics]: Three- clearly visible in the animation because of sudden changes in the
Dimensional Graphics and Realism - animation. direction of motion (Figure 1).
[]
key 2
33
@SIGGRAPH'84
i
A third common problem is distortion, which may occur on the interval between the i th and i + 1 st key frames. The
whenever the movement has a rotational component (Figure 3). positions of the inbetween frames which will correspond to the
key position in question, then, will be P(s) for
s =A,2.A, ... 1--Afor
key 1
t, = ! + l
N~
11/
expressed in terms of small numbers of control points using the
techniques described in, for example, [7]. For the purposes of
the discussion, w e w i l l fix our attention on one such point, 1
designated P~ and referred to as the key position, in the i th key
frame:
Pi = (xi,Yi,Zi)
(We will carry on the discussion in terms of 3-D animation.)
Given a sequence of corresponding key positions, 1 I 1
34
Computer Graphics Volume18, Number 3 July 1984
hi h2 h3 h4
function value at s = 0 1 0 0 0
1 1
function value at s = 1 0 1 0 0
derivative at s = 0 0 0 1 0
derivative at s = 1 0 0 0 1 Equation 3. The Catmull-Rom spline.
p(s) = (x(s),y(s),z(s))
P(s) = s-h.C
35
@SIGGRAPH'84
The concepts of tension and bias have been introduced Tension is implemented as a scale factor which changes the
before in connection with approximating splines in [2], [3], [4]. length of both the incoming and outgoing parts of the tangent
O u r use of the term "bias" is similar to the concept being used vector equally at a key position:
by the authors of these references. The concept of "tension"
which we are using is different, however. Their use of the word
"tension" refers to an effect produced by adjusting the m a t c h
between the second derivatives of adjoining polynomial DSi = DD i 1 ((P~+I--Pi)+(Pi--Pi-~))
= (l--t)'-~-"
segments, and we are exercising control only over first
derivatives. W e are able to produce visually similar effects,
however, and so have chosen to borrow the use of their term. Equation 4. Tension equation.
An excellent introduction to the theory of interpolating and
approximating splines for computer animation can be found in
[10].
The three control parameters tension, continuity, and bias
are introduced by the convention of separating each tangent at For the default curve t = 0 , and the tangent vector is the average
the i th key position into an incoming and an outgoing part, of the two adjacent chords (Figure 8).
respectively the source derivative DS i and the destination
derivative DD~ as indicated in Figure 6.
I
I
I
DSi+ l
DDi DDi + 1
Pi+l
I
DSi I I
I
I I
I I
q~ - TENSION
Figure 6. Incoming and oui.goingtangents of two key positions.
3.1. Tension Increasing the tension to t = 1 reduces the length of the tangent
The tension p a r a m e t e r t controls how sharply the curve vector to zero and thus tightens the curve (Figure 9).
bends at a key position (Figure 7).
TENSION , ~ TENSION
Figure 7. Bending of the curve under various tensions. Figure 9. The effect of increasing the tension parameter.
36
Computer Graphics Volume18, Number 3 July 1984
Reducing the tension to t = - 1 increases the tangent vector to Neither of these approaches is very satisfactory because
twice its default length and produces more slack in the curve the discontinuity cannot be controlled. While it is true that,
(Figure 10). mathematically speaking, a spline's derivative is either
continuous or discontinuous, the artist's view is quite different.
He would like to have more control over continuity than a
simple o n / o f f switch. In fact, from the animator's point of view
two curve segments which have very different tangent vectors at
their joint appear "more discontinuous" than two curve
s e g m e n t s which have fairly similar tangent vectors. This
concept is implemented in our system as a parameter which
controls the continuity/discontinuity at a key position (Figure
12).
l --TENSION
3.2. Continuity
The principal reason for using splines in key frame
animation is to avoid discontinuities in the direction and speed
of motion which are produced by linear interpolation. However,
in animation discontinuities are sometimes necessary to create
realistic effects such as punching, bouncing, etc. A c o m m o n ~9 TENSION
technique to introduce such a discontinuity into an otherwise CONTINUITY
continuous spline is to repeat a key position or to simply
terminate the spline at a key and start an entirely independent
spline to interpolate the next sequence of key frames. Figure 13. Default continuity.
37
~SIGGRAPH'84
As I c I increases, the two tangent vectors become increasingly Looking only at the path of motion, the effects of
distinct. W h e n c = - 1 , the source tangent vector DS~ reduces to increasing the tension or reducing the continuity seem to be
the source chord, and the destination tangent vector DDi is the rather similar (Figures 17 and 18).
destination chord, producing a pronounced corner in the curve
(Figure 14).
~L
(~ TENS[0N
~9 TENSION
l CONTINUITY
(~ EONTINU/TY
Figure 14. The effect of decreasing the continuity parameter. Figure 17. Default tension and continuity.
Going in the opposite direction, at c = l , DS~ = P~+I--P~ and
DDI ~ Pi--Pi_h produces a corner pointing in the opposite
direction (Figure 15).
, ~ TENSION
-- ~ TENSION
........ ' ~ CONTINUITY
, CONTINUITY
I.."-.L
I I~9 TENS[0N
''°" ° I
~9 TENSION
CONTINUITY
CONTINUITY
Figure 16. Several continuity values applied uniformly to all keys. Figure 19. Differences in motion: tension vs. continuity.
38
Computer Graphics Volume18, Number 3 July 1984
3.3. Bias
The bias parameter b controls the direction of the path as
it passes through a key position (Figure 20).
q? ¢ TENSION
CONTINUITY
, BIR5
i TENSION
[~ CONTINUITY
~P , , Bins
1+ b 1 ~ 2b.(Pi+l I ~ - BIA5
D S i = DDi = --'-f'-'(Pi--P~-l) +
Note that with b = 0 the two chords are weighted equally, and The bias parameter easily simulates the traditional animation
we obtain the default spline shown in Figure 21. When b = - - l , effect of following through after an action by "overshooting" the
the tangent vector is completely determined by the destination key position ( b = l ) , or exaggerating a movement by
chord (Figure 22), "undershooting" a key position (b = - 1).
39
@SIGGRAPH'84
40
Computer 6raphics Volume18, Number 3 July 1984
into an incoming and an outgoing part and specifying these parts [8] D. Kochanek, "A Computer System for Smooth Keyframe
as a weighted average of the chords defined by the nearest Animation", MMath Thesis, Department of Computer
neighbor key frames. Our system has the additional benefit that Science, University of Waterloo, Technical Report CS-82-
it can make adjustments to overcome speed discontinuities when 42, December, 1982.
the number of inbetweens is changed between key frames.
[9] W. Reeves, "Inbetweening for Computer Animation
Utilizing Moving Point Constraints", Computer Graphics
(SIGGRAPH "81), 15 (3), pp. 263-269, August, 1981.
7. Acknowledgements
Feedback from animators is particularly important in a [10] A. Smith, "Spline Tutorial Notes - Technical Memo No.
project such as this. We would especially like to thank Robert 77", SIGGRAPH "83 Tutorial Notes: Introduction to
Forget, Rene Jodoin, Daniel Langlois, and Marc Aubry from the Computer Animation, pp. 64-75, July, 1983.
French Animation Studio of the National Film Board of Canada
who as "test users" made many valuable suggestions which [11] M. Tuori, "Tools and Techniques for Computer-aided
helped to clarify and refine our ideas. Animation", MSc Thesis, Department of Computer
Most of the illustrations in this paper are frames from the Science, University of Toronto, 1977.
film "Interpolating Splines with Variable Tension, Continuity,
and Bias" (National Film Board of Canada, 1984). We
gratefully acknowledge the assistance of the Defence and Civil
Institute of Environmental Medicine, Toronto, in the filming of
this production.
This research was supported in part by the National Film
Board of Canada, the National Sciences and Engineering
Research Council of Canada, the Province of Ontario's BILD
program, the University of Waterloo, and the Computer
Graphics Laboratory.
8. Bibliography
41