3.((.
I(
ADÄ.
DESIGN OF
COMPUTER ANIMATION
LANGUAGES
Terry Thoke Trout, BSCS
A Thesis For Master of Science
Department Of Computer Science
University of Adelaide
January 1990 BY
Cì^- U:<\-.
t <{u .\ ') (r.-- '-!f\
ABSTRACT DECLARATION
ACKNOWLEDGMENTS
CHAPTER
1: INTRODUCTION
1..1
Inroduction
1.2 Descriptions of the Four Animation Languages 1.2.1 GRAMPS
1.2.2 ASAS 1.2.3
Dial
1.2.4 SCEFO 1.3 Thesis FormatCHAPTE,R
2: BACKGROUND
OFANIMATION
SYSTEMS2.1
Introduction2.2
Objens2.2.I
ObjectTypes2.2.2
Object Transformations2
.3
Frame to Frame InterPolation2.4
Scripts2.5
Displaying Individual Animation Frames2.6
InputMethods2.7
Control2.8
Creating an Animation Sequence Quickly.andEasily2.9
Programming Language Vèrsus Menu Driven System CHAPTER3: DATA
STRUCTURES3.1
Introduction3.2
Data Structure Primitives and Constructors3.3
Operators3.4 D^taType
Checking and Coercion3.5
GRAMPS.1
Data Structure Primitives.2
Data Structure Constructors.3
Instantiating Objects.4
Operations-on Objects and Interpolation.5
Values3.6
ASAS3.6.1
Data Structure Primitives3.6.2
Data Structure Constructors3.6.3
PredefinedData3.6.4
Variables3.6.5
Operators3.6.5.
1
Local OPerators3.6.5.2
Global Operators3.6.5.3
Other Operators3.7 DIAL
3.7.1
Data Stucture Primitives3.7
.1.1
Contentsof
a Surface Procedure 3.7.I.2
Instantiating Objects3.7.2
Operators5
6 7
I
9 9 10 10 11
t2 t4 t4
L4 15 16
t7 t7
18 18 T9 20
3.5 3.5 3.5 3.5 3.5
2l
2T 22 22 22 23 23 24 26 27 28 28 28 29 30 30
3r 3l
32 32 32 32 33 33 34
1
Table of Contents
3.7.2.1
Operations on Objects 3.7.2.2
The "Change" O¡lerator3.7.2.3
Other Operators3.7.3
Type Checking3.8
SCEFO2
Data Stn¡cture Object TemPlate Instantiating Objects
s
Coercion, TyPe Checking CHAPTER
4: CONTROL
STRUCTURES4.1
Introduction4.2
Selection4.3
Iteration4.4
Interpolation4.5
Procedure and Macro Control Structures4.6
GRAMPS4.6.1
Selection and Iteration4.6.2
Interpolation4.6.3
Macros4.7
ASAS4.7.1
Iteration4.7.2
Actors4.7.3
Interpolation4.7.4
Hierarchies4.8 DIAL
Applying Operations to Objects Execution Lines
3.8.1
3.8.2
3.8.3 3.8.3.8.
34 34 35 36 36 36 37 38 38 39 40 40
4l 4l
42 42 42 42 43 43 43 44 45 45 46 46 46 47 48 49 50 51 51 51 52 53 54 54 55 56
57 57 57 57 58 59 59 59 60 60 61 8
8 8 8 8 4.
4.
4.
4.
4.
.1 .2 .3 .4 .5
Syntax Problems with Execution Lines Interpolation Operation s
Definite-Iteration Constructs
4.8.6
Procedures4.9
SCEFO4.9.1
Applying Operators to Objects 4.9.2
Interpotating SCEFO Operations4.9.3
Order of Operations4.9.4
Loops4.9.5
Procedures4.9.6 Invoking
a Procedure4.9.7
HierarchiesCHAPTER
5: NAME
STRUCTURES5.1
Inuoduction5.2
Primitive Name Stnrctures5.3
Binding Times5.4
Name Structure Constructors - Scope5.4.1
Static Scope5.4.2
Dynamic Scope5.5
Parameters5.6
GRAMPS5.6.1
Primitive Name Sffuctures5.6.2
Memory is Dynamically Allocated5.6.3
Name Structure Constructors 615
.6.4
Passing Parameters5.7
ASAS5.7.1
Names Have Dynamic Scopes5.7.1.1
Global Name-Binding Functions5.7.1.2
Passing P¿¡rameters5.3.1.3 IÆalVariables
5.7.1.4
More on Scope5.7.2
Actors5.7
.2.1
Communication Between Actors5.7.2.2
Scope Barriers Can be Bypassed5.7.3
Other Functions For Binding Names5.7.4
Dynamic Global Bindings areDangerous5.8 DIAL
5.8.1
Primitive Name Structures5.8.2
Binding Times5.8.3
Name Structure Constructors 5.8.3.1
Surface-Dehnition Procedure5.8.3.2
"Subscript"5.8.3.3 Block
Structure of a Script5.8.3.4
ScopeAllows
Transforming Unnamed Objects5.8.3.5
Reference Environments areDisjoint 5.9
SCEFO.1
Primitive Name Stnrctures.2
Simple Variables.3 hop
Variables.4
Names are Bound to Primitive Data When Created.5
Binding Time.6
Names Must Be Unique5.9.7
Type and Value Bindings5.9.8
Name Structure Constructors5.9.9
Scope of Fields61 62 62 62 63 63 64
&
65 66 66 66 67 67 67 68 68 68 68 69 70 70
7I
7L
7l
72 72 73 73 5.9
5.9 5.9 5.9 5.9 5.9
78 78 79 79 80 80 80 80 81 81 81 82 83 85 85 87 87 87 87 88 89 75 75 76 CHAPTER
6:
DESIGN OF APE -ANIMATON PROGRAMMING ENVIRONMENT
6.1
Introduction6.2
Design Method6.3
Ape System6.4
Commenting Scripts6.5
Data Structures6.5.1
Data Structure Primitives6.5.1.1 "Models"
6.5. 1. 1.
1
Predefined Model Figures 6.5. 1.1.2
User-defined Models6.5.L.2
Instantiation6.5.1.3
Group Data Structure Constructor6.5.2
Operators6.5.2.1 IÆal
Transformation Operators6.5.2.2
Global Transformation Operators6.5.2.3
Other Operators6.5.2.4
Type Checking and Coercion6.6
Control Structures6.6.1
Iteration and Interpolation 6.6.1.
Action Definition6.6.1.2
Schedule6.6.1.2.1
Automatic ScheduleFiller
Table of Contents
6.6.1.2.2
Grouping Schedules6.6.1.2.3
Breaking Journals6.6.2
Other Definite Iteration Constructs6.6.3
Conditionals6.6.3.1
Charting Execution of Conditionals6.6.3.2
Repeating Conditionals 6.6.4
Indefinite Iteration6.6.5
ControlSfucture
Constructors6.6.5.1
Procedures and Functions 986.6.5.2
Actors6.7
Name Structures4 91 92 93 94 95 96 97 98 98
Primitives
Dynamic Memory Management Name Structure Constructors
3.1
Scope Defined by Script Block-Structure3.2
Scope Defined by Control Stmctures3.3
Parameter Passing3.4
Scope Defined by Data Structures CHAPTER7: CONCLUSION
7.1
The Design In Retrospect7.2
FinalRemarksBIBLIOGRAPHY
6.7.1
6.7.2
6.7.3 6.7.6.7.
6.7.
6.7.
99 100 100 101 101 101
r02 ro2
103
104
r04 t04
105
This
thesis analyzesfour
existing animation languages that are quite diversein
their designs:GRAMPS, ASAS (Actor/Scriptor Animation System), Dial (Diagrammatic Animation Language), and SCEFO
(SCEneFOrmat language for describing
scenesin the Brown University Animation
GenerationSystem).
The analysisis
performed using measurements designedfrom
computer graphics concepts, animation requirements, and aspects and designprinciples of
programminglanguages. In particular,
the data structures(primitive
graphics objects),control
sffuctures and name structures aspectsof
thefour
languages are thoroughly examined, aswell
as those designprinciples, slightly
adaptedto computer
graphics and animation,found to exist in
good programminglanguages.
Otherimportant
aspectsof
the languages are discussed, such as how an animation sequence is represented, how any particular frameof
a sequencemay
be viewed at anytime,
andhow user-friendly
yetcontrollable
the languagesare. \Morking with
thefindings from this
analysis anew
animation language is designed andpartially
implemented, incorporating the most positive partsof
eachof
thefour
languages studied and adding other useful features.5
i
-'t
1 i
I
i i
DECLARATION
This thesis contains no material which has been accepted
for
the awardof
any other degreeor
diplomain
anyUniversity. To
the bestof my knowledge
andbelief,
the thesis contains no material previousþ published or written by another petson, except where due reference is made in the text of the thesis.I
consent to the thesis being made availablefor
photocopying and loanif
applicableif
accepted for the award of the degree.Terry
Trout
January 1990
6
I
am indebtedto my
supervisor,Dr. Marc
Berger,for his
guidance andsupport. I
am alsograteful to Dr. Chris Marlin
andDr. Dave Bover for their help in the early
stagesof my
resea¡ch.This research was supported in part by an Adelaide University Research Grant.
'i
I I I
I
7