0% found this document useful (0 votes)
442 views20 pages

Animation Maths: Ivo de Pauw Bieke Masselis

This document appears to be the title page and table of contents for a campus handbook on animation math. The title page lists Ivo De Pauw and Bieke Masselis as authors. The table of contents provides an overview of 9 chapters that will be covered in the book, including arithmetic, linear systems, trigonometry, functions, vectors, parameters, kinematics and more. It is dedicated to Malaika.

Uploaded by

Lil Iced heart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
442 views20 pages

Animation Maths: Ivo de Pauw Bieke Masselis

This document appears to be the title page and table of contents for a campus handbook on animation math. The title page lists Ivo De Pauw and Bieke Masselis as authors. The table of contents provides an overview of 9 chapters that will be covered in the book, including arithmetic, linear systems, trigonometry, functions, vectors, parameters, kinematics and more. It is dedicated to Malaika.

Uploaded by

Lil Iced heart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

IVO DE PAUW BIEKE MASSELIS

CAMPUS HANDBOOK

Animation
Maths

Titelpagina.indd 1 1/06/2021 18:44


eCampusLearn

Go to www.ecampuslearn.com.

Fill in the following code:

Good luck!

Chapter 1, David Ritter; 2, John Evans; 3, Wouter Verweirder; 4, Daryl Beggs, Juan Pablo Arancibia Medina;
5, Stephanie Berghaeuser; 6, Martin Walls; 7, 12, Wouter Tansens; 8, Danie Pratt; 9, Ivo De Pauw;
10, Caetano Lacerda; 11, Ken Munyard; 13, Bieke Masselis; 14, Boke Haide; 15, Waldemar Zielinski;
16, Detje Holger; 17, Cornelia Roessing; p.25, p.103, Wouter Tansens; p.48, Wouter Verweirder;
p.52, Leo Storme; p.185, Bieke Masselis; p.268, Yu-Sung Chang; p.343, Angelo Fallein.

D/2021/45/69 – ISBN 978 94 014 7495 5 – NUR 918

Cover design: Keppie & Keppie


Interior design: Ivo De Pauw, Bieke Masselis

©
Ivo De Pauw, Bieke Masselis & Lannoo Publishers nv, Tielt, 2021.

LannooCampus Publishers is a subsidiary of Lannoo Publishers,


the book and multimedia division of Lannoo Publishers nv.

All rights reserved.


No part of this publication may be reproduced and/or made public,
by means of printing, photocopying, microfilm or any other means,
without the prior written permission of the publisher.

LannooCampus Publishers
Vaartkom 41 box 01.02 P.O. Box 23202
3000 Leuven 1100 DS Amsterdam
Belgium Netherlands
www.lannoocampus.com
This book is dedicated to Malaika.

“Sometimes I’m black, sometimes I’m white


it all depends on who is on the other side
there are things they cannot see
and there are things I can not hide”

Bruno Deneckere (Someday, June 2006)


Contents

A c k n ow l e d g e m e n t s 15

Chapter 1 · Arithmetic refresher 17


1.1 Algebra 18
Real numbers 18
Real polynomials 23
1.2 Equations in one variable 25
Linear equations 25
Quadratic equations 26
1.3 Logarithms 31
1.4 Exercises 34

C h a p t e r 2 · L i n e ar s y s t e m s 37
2.1 Definitions 38
2.2 Methods for solving linear systems 40
Solving by substitution 40
Solving by elimination 41
2.3 Exercises 45

C h a p t e r 3 · Tr i g o n o m e t r y 47
3.1 Angles 48
3.2 Triangles 50
3.3 Right triangle 54
3.4 Unit circle 55
3.5 Special angles 57
π
Trigonometric ratios for an angle of 45°= 4 rad 58
π
Trigonometric ratios for an angle of 30°= 6 rad 58
π
Trigonometric ratios for an angle of 60°= 3 rad 59
Overview 59
3.6 Pairs of angles 60
3.7 Sum identities 60
3.8 Inverse trigonometric functions 63
3.9 Exercises 65
6 A N I M AT I O N M AT H S

C h a p t e r 4 · Fu n c t i o n s 67
4.1 Basic concepts on real functions 68
4.2 Polynomial functions 69
Linear functions 69
Quadratic functions 71
4.3 Intersection of functions 73
4.4 Logarithmic functions 75
4.5 Exponential functions 76
4.6 Trigonometric functions 78
Elementary sine function 78
General sine function 78
Transversal oscillations 82
4.7 Inverse trigonometric functions 82
arcsine 82
arccosine 84
arctangent 84
atan2 85
4.8 Maclaurin expansions 86
4.9 Exercises 89

Chapter 5 · The Golden Section 91


5.1 The golden number 92
5.2 The golden section 94
The golden triangle 94
The golden rectangle 95
The golden spiral 96
The golden pentagon 98
The golden ellipse 98
5.3 Golden arithmetic 99
Golden identities 99
The Fibonacci numbers 100
5.4 The golden section worldwide 103
5.5 Exercises 105

C h a p t e r 6 · C o or d i n a t e s y s t e m s 107
6.1 Cartesian coordinates 108
6.2 Parametric curves 108
6.3 Polar coordinates 112
6.4 Polar curves 115
6.5 Exercises 118
CONTENTS 7

C h a p t e r 7 · Ve c t or s 121
7.1 The concept of a vector 122
Vectors as arrows 122
Vectors as arrays 123
Free vectors 126
Base vectors 126
7.2 Addition of vectors 127
Vectors as arrows 127
Vectors as arrays 127
Vector addition summarised 128
7.3 Scalar multiplication of vectors 129
Vectors as arrows 129
Vectors as arrays 129
Scalar multiplication summarised 130
Normalisation 130
Properties 130
7.4 Vector subtraction 131
Creating free vectors 131
Euler’s method for trajectories 132
7.5 Decomposition of vectors 133
Decomposition of a plane vector 133
Base vectors defined 134
7.6 Dot product 135
Definition 135
Geometric interpretation 136
Orthogonality 139
7.7 Cross product 140
Definition 140
Geometric interpretation 142
Parallelism 144
7.8 Normal vectors 145
7.9 Exercises 147
8 A N I M AT I O N M AT H S

C h a p t e r 8 · Par a m e t e r s 149
8.1 Parametric equations 150
8.2 Vector equation of a line 151
8.3 Intersecting straight lines 155
8.4 Vector equation of a plane 157
8.5 Exercises 161

Chapter 9 · Kinematics 163


9.1 Measures 164
9.2 Deltatime 165
9.3 Translational motion 165
Rectilinear motion with constant velocity (RMCV) 168
Rectilinear motion with constant acceleration (RMCA) 168
Free fall 171
Summary 174
9.4 Circular motion 176
Uniform circular motion (UCM) 176
Nonuniform circular motion (NCM) 183
Summary 186
9.5 Planar curvilinear motion 187
Normal-tangential components 188
Radial-angular components 191
9.6 Independence of Motion 194
Combined rectilinear motions with constant velocities 194
Projectile motion (PM) 195
9.7 Exercises 200

C h a p t e r 10 · C o l l i s i o n d e t e c t i o n 203
10.1 Collision detection using circles and spheres 204
Circles and spheres 204
Intersecting line and circle 206
Intersecting circles and spheres 208
10.2 Collision detection using vectors 211
Location of a point with respect to other points 211
Altitude to a straight line 212
Altitude to a plane 214
Frame rate issues 216
Location of a point with respect to a polygon 217
10.3 Exercises 220
CONTENTS 9

C h a p t e r 11 · M a t r i c e s 223
11.1 The concept of a matrix 224
11.2 Determinant of a square matrix 225
11.3 Addition and scalar multiplication of matrices 227
Addition of matrices 227
Scalar multiplication of a matrix 229
11.4 Transpose of a matrix 230
11.5 Dot product of matrices 230
Introduction 230
Condition 232
Definition 232
Properties 233
11.6 Inverse of a matrix 235
Introduction 235
Definition 235
Conditions 236
Row reduction 236
Matrix inversion 237
Inverse of a product 240
Solving systems of linear equations 241
11.7 The Fibonacci operator 243
11.8 The matrix exponential 245
Structures 245
Matrix exponential 245
11.9 Exercises 247

C h a p t e r 12 · B e z i e r c u r v e s 249
12.1 Vector equation of segments 250
Linear Bezier segment 250
Quadratic Bezier segment 251
Cubic Bezier segment 252
Bezier segments of higher degree 254
12.2 De Casteljau algorithm 255
12.3 Bezier curves 256
Concatenation 256
Linear transformations 258
Illustrations 258
12.4 Matrix representation 260
Linear Bezier segment 260
Quadratic Bezier segment 261
10 A N I M AT I O N M AT H S

Cubic Bezier segment 262


12.5 B-splines 264
Cubic B-splines 264
Matrix representation 265
De Boor’s algorithm 267
12.6 Exercises 269

C h a p t e r 13 · Tr a n s f or m a t i o n s 271
13.1 Translation 272
13.2 Scaling 277
13.3 Rotation 280
Rotation in 2D 280
Rotation in 3D 282
13.4 Reflection 284
13.5 Shearing 286
13.6 Combining standard transformations 288
2D rotation around an arbitrary centre 290
3D scaling about an arbitrary centre 293
2D reflection over an axis through the origin 294
2D reflection over an arbitrary axis 295
3D combined rotation 298
13.7 Row-representation 299
13.8 Exercises 300

C h a p t e r 14 · Tr a n s f or m a t i o n A n a l y s i s 303
Typesetting 304
14.1 Translation analysis 304
14.2 Scaling analysis 308
14.3 Rotation analysis 311
14.4 Composite transformation analysis 315
14.5 Conventions 318
14.6 Applications 319
Pivot transformation 319
Orbit transformation 320
Look-at transformation 322
14.7 Exercises 326

C h a p t e r 15 · S c e n e G r a p h s 329
15.1 Concept of a scene graph 330
15.2 Bone structures 332
CONTENTS 11

15.3 Solar systems 336


15.4 Exercises 339

C h a p t e r 16 · V i e w Tr a n s f or m a t i o n 341
16.1 The Rendering Pipeline 342
The concept of the pipeline 342
The stages of the pipeline 342
16.2 Camera transformation 344
16.3 View transformation 346
16.4 View operator 349
16.5 Camera with zoom 351
16.6 Exercises 354

C h a p t e r 17 · H y p e r c o m p l e x n u m b e r s 357
17.1 Complex numbers 358
17.2 Complex number arithmetic 362
Complex conjugate 362
Addition and subtraction 362
Multiplication 363
Exponentiation 365
Division 366
17.3 Complex numbers and transformations 368
Translation 368
Standard rotation 369
Standard scaling 370
Composite transformation 370
17.4 Complex continuation of the Fibonacci numbers 371
Integer Fibonacci numbers 371
Complex Fibonacci numbers 372
17.5 Quaternions 374
17.6 Quaternion arithmetic 375
Addition and subtraction 375
Scalar multiplication 376
Normalisation 376
Quaternion multiplication 376
Quaternion conjugate 378
Inverse quaternion 379
17.7 Quaternions and rotations 379
Trigonometrical representation of quaternions 380
Euler representation of quaternions 380
12 A N I M AT I O N M AT H S

Quaternion exponentiation 381


The quest for the quaternion rotation 382
Unit rotation quaternion 385
17.8 Exercises 389

Annex A · Real numbers in computers 391


A.1 Scientific notation 391
A.2 The decimal computer 391
A.3 Special values 392

Annex B · Notations and Conventions 393


B.1 Alphabets 393
Latin alphabet 393
Greek alphabet 394
B.2 Mathematical symbols 394
Sets 394
Mathematical symbols 395
Mathematical keywords 396
Numbers 396

Annex C · The International System of Units (SI) 397


C.1 SI Prefixes 397
C.2 SI Base measures 398
C.3 SI Supplementary measure 398
C.4 SI Derived measures 399

Bibliography 400

Index 403
Acknowledgements

We hereby insist on thanking a lot of people who made this book possible: Prof.
Dr. Leo Storme, Wim Serras, Wouter Tansens, Wouter Verweirder, Koen Samyn [14]
(credited for the chapters Transformation Analysis, Scene Graphs, View Transformation),
Hilde De Maesschalck, Ellen Deketele, Conny Meuris, Hans Ameel, Dr. Rolf Mertig,
Dick Verkerk, ir. Gose Fischer, Prof. Dr. Fred Simons, Sofie Eeckeman, Dr. Luc
Gheysens, Dr. Bavo Langerock, Wauter Leenknecht, Marijn Verspecht, Sarah Rommens,
Prof. Dr. Marcus Greferath, Dr. Cornelia Roessing, Tim De Langhe, Niels Janssens,
Peter Flynn, Jurgen Leemans, Stef Lantsoght, Hilde Vanmechelen, Jef De Langhe,
Ann Deraedt, Rita Vanmeirhaeghe, Prof. Dr. Jan Van Geel, Dr. Ann Dumoulin,
Bart Uyttenhove, Rik Leenknegt, Peter Verswyvelen, Roel Vandommele, ir. Lode De
Geyter, Bart Leenknegt, Olivier Rysman, ir. Johan Gielis, Frederik Jacques, Kristel
Balcaen, ir. Wouter Gevaert, Bart Gardin, Dieter Roobrouck, Dr. Yu-Sung Chang
(Wolfram Demonstrations [24]), Prof. Dr. Sy Blinder (Wolfram Demonstrations), Steven
De Keninck, Prof. Dr. Mark McClure (Wolfram Demonstrations), Dr. Felipe Dimer de
Oliveira (Wolfram Demonstrations), Steven Verborgh, Ingrid Viaene, Kayla Chauveau,
Angelika Kirkorova, Thomas Vanhoutte, Fries Carton, Jef Daels, Andries Geens, Angelo
Fallein, Jolan Plaum, Charles Derre, Anna Rich and whomever we might have forgotten!

Hereby our special thanks to Dick Verkerk for supporting our


Wolfram Application Server [25]) server in the Netherlands at
can.nl
Chapter 1 · Arithmetic refresher
18 A N I M AT I O N M AT H S

As this chapter offers all the necessary mathematical skills for the full mastery of all
further topics explained in this book, we strongly recommend it. To serve its purpose, the
successive paragraphs below refresh some required aspects of mathematical language as
used on the applied level.

1.1 Algebra

Real numbers
We typeset the set of:
. natural numbers (unsigned integers) as N including zero,
. integer numbers as Z including zero,
. rational numbers as Q including zero,
. real numbers (floats) as R including zero.
All the above make a chain of subsets: N ⊂ Z ⊂ Q ⊂ R.
To avoid possible confusion, we outline a brief glossary of mathematical terms. We recall
that using the correct mathematical terms reflects correct mathematical thinking. Putting
down ideas in the correct words is of major importance for profound insight.

Sets
. We recall writing all subsets in between braces, e.g. the empty set appears as {}.
. We define a singleton as any subset containing only one element, e.g. {5} ⊂ N, as
a subset of natural numbers.
. We define a pair as any subset containing just two elements, e.g. {115, −4} ⊂ Z,
as a subset of integers. In programming the boolean values true and false make up
a pair {true, f alse} called the boolean set which we typeset as B.
. We define Z− = {. . . , −3, −2, −1} whenever we need negative integers only. We
express symbolically that −1234 is an element of Z− by typesetting −1234 ∈ Z− .
. We typeset the set minus operator to delete elements from a set by using a back-
slash, e.g. N \ {0} reading all natural numbers except zero, Q \ Z meaning all pure
rational numbers after all integer values left out and R \ {0, 1} expressing all real
numbers apart from zero and one.
ARITHMETIC REFRESHER 19

Calculation basics

operation expression a b c

to add a+b = c term term sum


to subtract a−b = c term term difference
to multiply a·b = c factor factor product
a
to divide b = c, b 6= 0 numerator divisor quotient
or denominator or fraction
to exponentiate ab = c base exponent power
√b
to take the root a=c radicand index radical
return factorial n! = c n factorial

We define the factorial of a natural argument as the returned product of this argument
multiplied with all natural numbers from this number n down to 1. Put in symbols:

n! = n · (n − 1) · (n − 2) · . . . · 3 · 2 · 1 restricted to n ∈ N

Furthermore we define 1! = 1 and as well 0! = 1.


Examples:

2! = 2 · 1 = 2, 3! = 3 · 2 · 1 = 6, 4! = 4 · 3 · 2 · 1 = 24.

We write the opposite of a real number r as −r, defined by the sum r + (−r) = 0. We
typeset the reciprocal of a nonzero real number r as 1r or r−1 , defined by the product
r · r−1 = 1.
We define subtraction as equivalent to adding the opposite: a − b = a + (−b). We define
division as equivalent to multiplying with the reciprocal: a : b = a · b−1 .
When we mix operations we need to apply priority rules for them. There is a fixed priority
list ‘PEMDAS’ in performing mixed operations in R that can easily be memorised by
‘Please Excuse My Dear Aunt Sally’.
. First process all that is delimited in between Parentheses,
. then Exponentiate,
. then Multiply and Divide from left to right,
. finally Add and Subtract from left to right.
20 A N I M AT I O N M AT H S

Now we discuss the distributive law ruling


within R, which we define as threading a ‘su-
perior’ operation over an ‘inferior’ operation.
In conclusion, distributing requires two differ-
ent operations.
Hence we distribute exponentiating over multi-
plication as in (a · b)3 = a3 · b3 . Likewise rules
multiplying over addition as in 3 · (a + b) =
3 · a + 3 · b.
However we should never stumble on this
‘Staircase of Distributivity’ by going too fast:

(a + b)3 6= a3 + b3 ,
√ √ √
a + b 6= a + b,
p
x2 + y2 6= x + y.

Fractions
A fraction is what we call any rational number written as nt given t, n ∈ Z and n 6= 0,
wherein t is called the numerator and n the denominator. We define the reciprocal of a
 −1
nonzero fraction nt as 1t = nt or as the power nt . We define the opposite fraction as
n
−t
− nt = n = t
−n . We summarise fractional arithmetic:
t
sum n + ab = t·b+n·a
n·b
t
difference n − ab = t·b−n·a
n·b
t
product n · ab = t·a
n·b
t
division n
a = nt · ab
b
t m m
= nt m

exponentiation n
1
singular fractions 0 = ±∞ infinity (see page 76)
0
0 =? indeterminate

Powers
We define a power as any real number written as gm , wherein g is called its base and m
its exponent. The opposite of gm is simply −gm . The reciprocal of gm is g1m = g−m , given
g 6= 0.
ARITHMETIC REFRESHER 21

According to the exponent type we distinguish between:


g3 = g · g · g 3 ∈ N,
g−3 = g13 = g·g·g
1
−3 ∈ Z,
1 √ 1
g 3 = 3 g = w ⇔ w3 = g 3 ∈ Q,
g0 = 1 g 6= 0.
Whilst calculating powers we may have to:

multiply g3 · g2 = g3+2 = g5 ,
g3
divide g2
= g3 · g−2 = g3−2 = g1 ,
2
exponentiate g3 = g3·2 = g6 them.

p
We insist on avoiding typesetting radicals like 7 g3 and strongly recommend their con-
temporary notation using radicand g and exponent 73 , consequently exponentiating g to
3 √ 1
g 7 . We recall the fact that all square roots are non-negative numbers, a = a 2 ∈ R+ for
a ∈ R+ .
As well as knowing the above exponent types, understanding the above rules to calcu-
late them is necessary for using powers successfully. We advise memorising the integer
squares running from 12 = 1, 22 = 4, . . ., up to 152 = 225, 162 = 256 and the integer cubes
running from 13 = 1, 23 = 8, . . ., up to 73 = 343, 83 = 512 in order to easily recognise
them.
Recall that the only way out of any power is exponentiating with its reciprocal exponent.
For this purpose we need to exponentiate both left hand side and right hand side of any
given relation (see also paragraph 1.2).
√7
Example: Find x when x3 = 5 by exponentiating this power.

3
 3 7 7
3
x 7 = 5 ⇐⇒ x 7 = (5) 3 ⇐⇒ x ≈ 42.7494.

We emphasise the above strategy as the only successful one to free base x from its expo-
nent, yielding its correct expression numerically approximated if we wish to.
Example: Find x when x2 = 5 by exponentiating this power.
 21 1 1
x2 = 5 ⇐⇒ x2 = (5) 2 or − (5) 2 ⇐⇒ x ≈ 2.23607 or − 2.23607.

We recall the above double solution whenever we free base x from an even exponent,
yielding their correct expression as accurately as we wish to.
22 A N I M AT I O N M AT H S

Mathematical expressions
Composed mathematical expressions can often seem intimidating or cause confusion.
To gain transparency in them, we firstly recall indexed variables which we define as
subscripted to count them: x1 , x2 , x3 , x4 , . . . , x99999 , x100000 , . . ., and α0 , α1 , α2 , α3 , α4 , . . . .
It is common practice in industrial research to use thousands of variables, so just picking
unindexed characters would be insufficient. Taking our own alphabet as an example, it
would only provide us with 26 characters.
We define finite expressions as composed of (math-
ematical) operations on objects (numbers, variables
or structures). We can for instance analyse the ex-
pression (3a + x)4 by drawing its tree form. This
example reveals a Power having exponent 4 and a
subexpression in its base. The base itself yields a
sum of the variable x Plus another subexpression.
This final subexpression shows the product 3 Times
a.
Let us also evaluate this expression (3a + x)4 . Say
a = 1, then we see our expression partly collapse
to (3 + x)4 . If, on top of this, we assign x = 2, our
expression then finally turns to the numerical value
(3 + 2)4 = 54 = 625.
When we expand this power to its pure sum expression 81a4 + 108a3 x + 54a2 x2 +
12ax3 + x4 , we did nothing but reshape its pure product expression (3a + x)4 .
We warn that trying to solve this expression – which is not a relation – is completely in
vain. Recall that inequalities, equations and systems of equations or inequalities are the
only objects in the universe we can (try to) solve mathematically.

Relational operators
We also refresh the use of correct terms for inequalities and equations.
We define an inequality as any variable expression comparing a left hand side to a right
hand side by applying the ‘is-(strictly)-less-than’ or by applying the ‘is-(strictly)-greater-
than’ operator. For example, we can read (3a + x)4 6 (b + 4)(x + 3) containing variables
a, x, b. Consequently we may solve such inequality for any of the unknown quantities a, x
or b.
We define an equation as any variable expression comparing a left hand side to a right
hand side by applying the ‘is-equal-to’ operator. For example (3a + x)4 = (b + 4)(x + 3)
is an equation containing variables a, x, b. Consequently we also may solve equations for
any of the unknown quantities a, x or b.

You might also like