47

Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Embed Size (px)

Citation preview

Page 1: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Mathematical Description of Motion and Deformation

– From Basics to Graphics Applications –

Hiroyuki Ochiai and Ken Anjyo

SIGGRAPH Asia 2013Course Notes

Ver. 1.1 : Several typos fixed (2013.12.03)

Ver. 1.0 : ACM Digital Library version (2013.11.19)

Page 2: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

About the authors:

Hiroyuki Ochiai: Professor, Institute of Math-for-Industry, Kyushu University, Japan. Hereceived his Ph.D. in mathematics in 1993 from the University of Tokyo. His research interestsinclude representation theory of Lie groups and Lie algebras, algebraic analysis and group the-ory. He has been joining the CREST project Mathematics for Computer Graphics led by KenAnjyo since 2010: http://mcg.imi.kyushu-u.ac.jp/

Ken Anjyo: R&D supervisor at OLM Digital. His research interest focuses on constructionof the mathematical and computationally tractable models, several of which were presentedwith his SIGGRAPH/IEEE CG&A papers. He is also a VES member since 2011. http://anjyo.org

Page 3: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Contents1 Introduction 5

2 Preliminaries: A few mathematical concepts 6

3 Rigid Motion 93.1 Rotation in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Translation in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.3 Reflections in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.4 3D rotation: axis-angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.5 3D rotation: Euler angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.6 3D rotations: Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.6.1 Several equivalent definitions of quaternions . . . . . . . . . . . . . . 133.6.2 Unit quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.7 Dual quaternion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Non-rigid transformation 154.1 Several classes of transformations . . . . . . . . . . . . . . . . . . . . . . . . 164.2 Semidirect product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.3 Decomposition of the set of matrices . . . . . . . . . . . . . . . . . . . . . . . 18

5 Exponential and logarithm of matrices 205.1 Exponential: definitions and basic properties . . . . . . . . . . . . . . . . . . . 205.2 Rodrigues’ formula and exponential . . . . . . . . . . . . . . . . . . . . . . . 215.3 Exponential/logarithm on shears . . . . . . . . . . . . . . . . . . . . . . . . . 215.4 Exponential/logarithm on 3D rotation . . . . . . . . . . . . . . . . . . . . . . 225.5 Exponential map on square matrices . . . . . . . . . . . . . . . . . . . . . . . 225.6 Loss of continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.7 The field of blending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

6 2D Affine transformation between two triangles 276.1 Triangles and an affine transformation . . . . . . . . . . . . . . . . . . . . . . 276.2 Comparison of three interpolation methods . . . . . . . . . . . . . . . . . . . 28

7 Global 2D shape interpolation 297.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307.2 Error function for global interpolation . . . . . . . . . . . . . . . . . . . . . . 317.3 Examples of local error functions . . . . . . . . . . . . . . . . . . . . . . . . . 327.4 Examples of constraint functions . . . . . . . . . . . . . . . . . . . . . . . . . 35

3

Page 4: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

8 Parameterizing 3D Positive Affine Transformations 368.1 The parameterization map and its inverse . . . . . . . . . . . . . . . . . . . . 368.2 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378.3 Deformer applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

8.3.1 Probe-based deformer . . . . . . . . . . . . . . . . . . . . . . . . . . 398.3.2 Cage-based deformer . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

9 Crowd control and orthogonal transformations 41

10 Further readings 43

4

Page 5: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

1 IntroductionWhile many technical terms, such as Euler angle, quaternion, and affine transformation, nowbecome quite popular in computer graphics, their graphical meanings are sometimes slightlydifferent from the original mathematical entities, which might cause misunderstanding or mis-use of the mathematical techniques. This course presents an intuitive introduction to severalmathematical concepts that are quite useful for various aspects of computer graphics, includingcurve/surface editing, deformation and animation of geometric objects, and camera control.

The objective of this course is to fill the gap between the original mathematical conceptsand the practical meanings in computer graphics without assuming any prior knowledge of puremathematics. We then focus on the mathematics for matrices, while we know there are so manyother mathematical approaches far beyond matrices in our graphics community. Thoguh thiscourse limited the topics to matrices, we hope you can easily understand and realize the powerof mathematical approaches. In addition this course demonstrates our ongoing work, which isbenefitted from the mathematical formulation presented in this course.

The organization of the course notes is as follows. We start with a brief introduction ofthe mathematical concepts about matrices that have been used in graphics. Next we explain thebasic definitions regarding the matrix group. These mathematical concepts will be demonstratedin the later application sections. In particular we provide several useful recipes for rigid motiondescription and global deformation, along with our recent work. Finally we show a list offurther readings, suggesting that the power of mathematical approaches in graphics cannot beexhausted in this course.

5

Page 6: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

2 Preliminaries: A few mathematical conceptsAffine transformation (or geometric transformation) gives a basic mathematical framework forgeometric operations in computer graphics, such as rotation, shear, translation, and their compo-sitions. Each affine transformation is then represented by 4×4-homogeneous matrix with usualoperations: addition, scalar product, and product. While the product means the composition ofthe transformations, geometric meanings of addition and scalar product are not trivial. We oftenwant to have geometrically meaningful weighted sum (linear combination) of transformations,which is not an easy task. These kinds of practical demands therefore have inspired graphicsresearchers to explore new mathematical concepts and/or tools. Many works have been con-ducted in this direction, including skinning [Chaudhry10], cage-based deformation [Nieto13],motion analysis and compression ([Alexa02], for instance).

Along with the affine transformations, we use Euler angle, and quaternion for rotation. Inconstrast, dual quaternion and axis-angle presentation are useful in rigid transformation (rota-tion and translation altogether). These mathematical concepts have become quite popular andhave a success to some extent in our graphics community. In this section we therefore take abrief look at the original mathematical meanings of these concepts related with matrices, whichwill be useful when we reuse or extend the basic ideas behind those concepts. The mathemat-ical definitions given below might be hard to make out at first. But don’t worry. You’ll soonunderstand them and why they are needed through the graphics applications in our course notes.

• Group: Let G be a set associated with an operation “·”. If the pair (G, ·) satisfies thefollowing properties, then it is called a group. Or we would call G itself a group.:

1. For any a,b ∈ G, the result of the operation, denoted by a ·b, also belongs to G.

2. For any a,b and c ∈ G, we have a · (b · c) = (a ·b) · c.

3. There exists an element e∈G, such that e ·a = a ·e = a, for any element a∈G. (Theelement is then called the identity of G).

4. For each a ∈ G, there exists an element b ∈ G such that a ·b = b ·a = e, where e isthe identity. (The element b is then called the inverse of a.)

As usual, R and C denote the set of all real numbers and the set of all complex numbers,respectively. R or C is then a group with addition (i.e., the operation “·” simply means+), and called commutative, since a+ b = b+ a holds for any element a,b of R or C.In the following sections, we’ll see many groups of matrices. For example, the set ofall invertible square matrices constitues a group with composition as its group operation.The group consisting of the invertible matrices with size n is called the general lineargroup of order n, and will be denoted by GL(n,R) or GL(n,C).

6

Page 7: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

• quaternion: The original definition of quaternion by William Hamilton seems a bit differ-ent from the one we use in graphics. In 1835 he justified calculation for complex numbersx+ iy as those for ordered pairs of two real numbers (x,y). He therefore wanted to finda new concept of numbers in higher dimensions, rather than treating rotation around anaxis. In 1843 he finally discovered it, referring to the totality of those numbers as Quater-nions. In the coure notes, the set of quaternions is denoted by H: H=R+Ri+R j+Rk,where we introduce the three numbers i, j and k satisfying the following rules:

i2 = j2 = k2 =−1i j =− ji = k

H is then called an algebra or field (see [Ebbinghaus91] for more details). We also notethat, as shown in the above rules, it is not commutative. A few more alternative definitionsof Quaternions will also be given later for our graphics applications. In particular we’llsee how 3D rotations can be represented with quaternions of unit length.

• Dual Quaternion: In 1873, as a further generalization of quaternions, William K. Clif-ford obtained the concept called biquaternions, which is now known as a Clifford algebra.The concept of dual quaternions, which is another Clifford algebra, was also introducedin the late 19th century. A dual quaternion can be represented with q = q0 +qεε , whereq0,qε ∈H and ε is the dual unit (i.e., ε commutes with every element of the algebra, whilesatisfying ε2 = 0). We’ll see later how rigid motions in 3D space can be represented withdual quaternions of unit length.

• Lie group and Lie algebra: A Lie group is a group and smooth manifold (i.e. locallyit is diffeomorphic to n-dimensional open disk). The matrix groups, like GL(n,R) forinstance, are examples of a real(-valued) Lie group. The totality of quaternions of unitlength constitues another Lie group. Although there is a general definition of Lie algebra,in this course we restrict ourselves to consider the Lie algebra associated with a Lie group.We then define the Lie algebra as a tangent space at the identity of the Lie group. In thissense, the Lie algebra can be considered as a linear approximation of the Lie group, whichwill be more explicitly described for the matrix groups in the following sections.

7

Page 8: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Basics

Page 9: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

3 Rigid MotionIn physics, a rigid body means as an object which preserves the distances between any twopoints of it with or without external forces over time. So decribing rigid motion means findingthe non-flip congruence transformations parameterized over time. For instance, in treating a3D rigid body X , we need to find the family S(t) of the non-flip congruence transformationsparameterized by t such that X(t) ≡ X , where X(t) denotes the position of X at time t. In thefollowing sections, a non-flip congruence transformation may also be called a rigid transfor-mation. The totality of the rigid transformations constitues a group, which will be denoted bySE+(n), where n is the dimension of the world where rigid bodies live (n = 2 or 3). So let’sstart with 2D rotation, a typical rigid transformation in R2.

3.1 Rotation in 2DA rotation in 2D centered at the origin is then expressed by a matrix

Rθ =

(cosθ −sinθ

sinθ cosθ

). (1)

Note that the angle θ is not unique. Rθ and Rθ ′ give the same rotation if and only if θ −θ ′ isan integer multiple of 2π . The compositions of two rotations and the inverse of a rotation areagain rotations: Rθ Rθ ′ = Rθ+θ ′ , R−1

θ= R−θ . The totality of the rotations in 2D forms a group

(Also recall the definition of group in section 2). It is denoted by

SO(2) = {Rθ | θ ∈ R}. (2)

We also write asSO(2) = {A ∈M(2,R) | AAT = I,detA = 1}, (3)

where M(2,R) is the set of square matrices of size two, and det is the determinant. The trans-pose1 of a matrix A is denoted by AT . The column vectors u,v ∈ R2 of a matrix A ∈M(2,R)form an orthonormal basis and the orientation from u to v is counter-clockwise if and only if Ais a rotation matrix. This means that an orthogonal matrix sends any orthonormal basis with thepositive orientation to some orthonormal basis with the positive orientation.

The result of the composition of several rotations in 2D does not matter the order. This factcomes from the commutativity; Rθ Rθ ′ = Rθ ′Rθ . Note that this never be true for 3D or higherdimensional case.

1There are several manners to write a transpose of a matrix; At is rather popular but we will use the notation At

to express the t-th power of a matrix A for a real number t, so that we want to avoid this conflict. Another choiceto write the transpose of a matrix A will be tA.

9

Page 10: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

3.2 Translation in 2DA translation Tb by a vector b ∈ R2 also gives a rigid transformation in 2D. The composition oftwo translations and the inverse of a translation also are translations: TbTb′ = Tb+b′ , T−1

b = T−b.This can be rephrased as ‘the totality of translations forms a commutative group’ (recall sect2. The translation Tb does not preserve the origin (unless b is a zero vector), so it cannot benaturally expressed by a 2×2 matrix. A homogeneous expression can express both translationsand rotations in 3×3 matrices.a11 a12 b1

a21 a22 b20 0 1

xy1

=

x′

y′

1

. (4)

Figure 1: 2D rigid motion

A successive operation of a rotation Rθ and a trans-lation Tb maps a column vector x = (x,y)T ∈ R2 toTb(Rθ (x)) = Rθ x+ b. In a homogeneous expression,it is written as (

Rθ b0 1

)(x1

)=

(x′1

). (5)

If we reverse the order of composition of a translationTb and a rotation Rθ , the result Rθ Tb is different fromTbRθ . To be more precise, we have

Rθ Tb = Tb′Rθ with b′ = Rθ (b). (6)

Note that the rotation component Rθ does not dependon the order of composition, while the translation partTb or Tb′ does. This fact can be rephrased as ‘the rigidmotion group in 2D is the semi-direct product2 of the rotation group with the translation group’,and can be denoted by SE+(2) = SO(2)nR2 for short. Note that equation (6) can be written as

Rθ TbR−θ = Tb′, (7)

which is rephrased as ‘the group of translations is a normal subgroup of the rigid motion group’;and is denoted by R2 /SE+(2).

In the previous section, we discuss rotations centered at the origin. In general, the rotationwith angle θ centered at b ∈ R2 can be expressed by

TbRθ T−b. (8)

2This notion is explained in Section 4.2.

10

Page 11: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

This bears a resemblance to (7), but the role of rotations and translations are reversed.Now we give a brief comment on complex numbers. Using the identification of C with R2

by z = x+ yi↔ (x,y)T , a rigid transformation in 2D can be expressed as(α β

0 1

)(z1

)=

(z′

1

), (9)

where α = eiθ = cosθ + isinθ , and β = b1 +b2i ∈ C.

3.3 Reflections in 2DA reflection (flip) with respect to a line y = (tanθ)x through the origin can be expressed as

(1 00 −1

)R−θ =

(cos2θ sin2θ

sin2θ −cos2θ

). (10)

In complex variables, z 7→ eiθ e−iθ z = e2iθ z = ze−2iθ . A reflection is orientation-reversing trans-formation which preserves the shape. The determinant of the matrix (10) is −1. The com-position of two reflections is a rotation, and the resulting rotation depends on the order ofcompositions of reflections:(

cos2θ sin2θ

sin2θ −cos2θ

)(cos2θ ′ sin2θ ′

sin2θ ′ −cos2θ ′

)= R2θ−2θ ′. (11)

Figure 2: Connected components

The totality of rotations and reflec-tions form ‘an orthogonal group’ ofsize two, which is defined by

O(2) = {g ∈M(2,R) | ggT = I2}.(12)

The totality of rotations, which is de-noted by

SO(2) = {g ∈ O(2) | det(g) = 1},(13)

is a normal subgroup of O(2) with in-dex two: [O(2) : SO(2)] = 2. A reflec-tion is not usually considered to be amotion, since it cannot be continuously conncted with the identity transformation. In otherwords, O(2) is not connected while SO(2) is connected. The set of reflections is another con-nected component of O(2).

11

Page 12: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

3.4 3D rotation: axis-angleSo far, we have discussed 2D rotaions and flips. We now consider a 3D rotation. Given a unitvector u ∈ R3 and the rotation angle θ , the rotation is given by

x 7→ Rx = x′ = (cosθ)x+(sinθ)(u×x)+(1− cosθ)(u ·x)u. (14)

Also matrix notation

R = I +(sinθ)

0 −u3 u2u3 0 −u1−u2 u1 0

+(1− cosθ)(uuT − I). (15)

If we choose an orthonormal basis {u,v,w} of R3 with the right orientation, that is, w = u×v,then

u′ = (cosθ)u+(1− cosθ)u = u, (16)v′ = (cosθ)v+(sinθ)(u×v) = (cosθ)v+(sinθ)w, (17)w′ = (cosθ)w− (sinθ)v. (18)

The rotation (14) is expressed as

R =

u1 v1 w1u2 v2 w2u3 v3 w3

1 0 00 cosθ sinθ

0 −sinθ cosθ

u1 u2 u3v1 v2 v3w1 w2 w3

. (19)

The totality of 3D rotations turns out to be

SO(3) = {g ∈M(3,R) | ggT = I3,det(g) = 1}. (20)

This is rather significant fact. In other words, every special orthogonal transformation in 3D isa rotation. (This fact is true only in 2D and 3D, and never be true for 4D or higher dimensions.That is, for n > 3, most of elememts in SO(n) have no rotation axis.) By this expression (20),the composition of two rotations is also a rotation. Along with the fact that the inverse of arotation is also a rotation, we can say that “the set of rotations is a group”.

3.5 3D rotation: Euler angleThe second method to express 3D rotations is so-called ‘Euler angle’, the composition of threesuccessive rotations along the coordinate axes:

Rz(θ3)Ry(θ2)Rx(θ1)

=

cosθ3 −sinθ3 0sinθ3 cosθ3 0

0 0 1

cosθ2 0 sinθ20 1 0

−sinθ2 0 cosθ2

1 0 00 cosθ1 −sinθ10 sinθ1 cosθ1

. (21)

The feature of Euler angle method is;

12

Page 13: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

• A composition of 2D rotations, which is easy to make.

• This method respects the axis, so is not free from the choice of coordinates.

• Gimbal lock, which is a demerit of this method. See [Ebbinghaus91].

• Not convenient for interpolation.

3.6 3D rotations: Quaternions3.6.1 Several equivalent definitions of quaternions

Some deficiency of Euler angle is relaxed by using quaternions. We now here briefly recall thequaternions. For more detail, see the references [Shoemake85] [Watt92] [Hanson06]. There are(at least) five ways expressing quaternions:

(i) H= R+Ri+R j+Rk, the real 4-dimensional algebra.

(ii) H= C+C j, the complex 2-dimensional vector space with a multiplication rule.

(iii) A subalgebra of M(4,R), consisting of the matrices of the forma −b −c −db a −d cc d a −bd −c b a

. (22)

(iv) A subalgebra of M(2,C), consisting of the matrices of the form(z −ww z

). (23)

(v) The set of pairs (s,q) of real numbers s and 3-dimensional vectors q.

Each of these realizations has some advantage and disadvantage. For example, in the pirc-ture (iii) and (iv) the multiplication rule is inherited from the matrix multiplication, so that thedistribution property q(q′+q′′) = qq′+qq′′ is quite obvious, while in the picture (i) the multipli-cation rule is defined as i j = k, so that the distribution property is non-trivial and to be examined(though it is easy and straightforward). The expression (ii) is shorter than that of (i), while weremark rather fancy relation w j = jw for w = C= R+Ri. The multiplicativity |qq′|= |q| · |q′|of norms of quaternions follows from the property of derminant det(AB) = det(A)det(B) inthe picture (iv). The realization (v) is most directly related with the description of 3D motion

13

Page 14: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

(e.g., 3D rotation by unit quaternion). It should be emphasized that these five realizations areequivalent. We can choose and use an appropriate way according to each purpose from theseequivalent realizations in order to understand, prove some formulae, and/or improve, make acode, etc. The notion of quaternions is generalization of complex numbers. Most significantdifference is the non-commutativity qq′ 6= q′q, in general. However, quaternions share manynice properties, for example, quaternions form a ring (i.e., addition, multiplication), a vectorspace (i.e., multiplication by a real number), a field (i.e., every non-zero element has its in-verse).

3.6.2 Unit quaternions

The conjugate is defined by a+bi+ c j+dk = a−bi− c j−dk ∈ R+Ri+R j+Rk =H. Theabsolute value is denoted by |q|=

√qq. The set of unit quaternions

H1 = {q ∈H | |q|= 1} (24)

is a group by a multiplication3. Any unit quaternion is of the form

q = cosθ

2+(sin

θ

2)u, (25)

where u is a unit imaginary quaternion. The multiplication p 7→ qpq−1 = qpq gives an actionof a unit quaternion q on H. This action preserves the imaginary quaternions

ImH= {bi+ c j+dk | b,c,d ∈ R}. (26)

To be more explicit,

qpq−1 = (cosθ)p+(sinθ)u×p+(1− cosθ)(u ·p)u, (27)

which is equal to Rodrigues’ formula (14). This is an identity transformation if and only ifq =±1. So, we obtain a surjective group homomorphism

H1→ SO(3), (28)

which induces an isomorphismH1/{±1} ∼→ SO(3). (29)

We give a meaning of (25) and its application to an interpolation by the exponential map4.The exponential map gives the surjective map

exp : ImH 3 θ

2u 7→ cos

θ

2+(sin

θ

2)u ∈H1. (30)

3The group H1 is also denoted by Sp(1), the compact symplectic group.4Comprehensive treatment of exponential maps will be discussed in the later sections.

14

Page 15: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

For given q0,q1 ∈H1, the spherical linear interpolation is given by

slerp(q0,q1, t) =sin((1− t)θ)

sinθq0 +

sin(tθ)sinθ

q1. (31)

This expression is explicit and fast, but does not explain why. It is characterized by

slerp(q0,q1, t) = slerp(1,q1q−10 , t)q0, (32)

slerp(1,exp(θu), t) = exp(tθu). (33)

The first equality is understood as an invariance under the rigth-translation. The second equalityis understood so that the interpolation, t 7→ tθu is chosen to be a linear interpolation on ImH.We summarize

SO(3) ← H1 log−→ ImH↓ slerp ↓ linear interpolation

SO(3) ← H1 exp←− ImH.

3.7 Dual quaternionFor a set R of numbers, its dual is defined to be R+Rε with the rule ε2 = 0 and εa = aε fora ∈ R. This idea can be applied for R =H successfully describing the 3D rigid motions, that is,rotations and translations. As are quaternions, several equivalent realization of dual quaternionsis useful.

(i) H+Hε with ε2 = 0.

(ii) A subalgebra of M(2,H), consisting matrices of the form(

z w0 z

).

We define a dual quaternion z+wε to be a unit dual quaternion if |z|= 1 and 〈z,w〉= 0, where〈·, ·〉 denotes the usual inner product. Every unit dual quaternion is a product of a unit quaternionz and a unit dual quaternion of the form 1+wε with w ∈ ImH. We identity a vector (x,y,z)T ∈R3 with the dual quaternion 1+(xi+ y j+ zk)ε ∈ H+Hε . Then, we define an action of a unitquaternion q = z+wε on p = 1+(xi+y j+ zk) by qpq∗, where q∗ = z−wε . The action of unitquaternion z expresses a rotation in 3D, and the action of unit dual quaternion q = 1+wε withw ∈ ImH expresses a translation in 3D. See [Kavan08] for detail. The semi-direct structureand the behavior of the exponential map on dual quaternions are understood both in the dualquaternion picture and matrix realization picture, as is the case of quaternions.

4 Non-rigid transformationIn this section, we discuss non-rigid transformations, i.e., matrices for deformations.

15

Page 16: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

4.1 Several classes of transformationsGL is not a graphic library (joke) but a general linear group, consisting of invertible lineartransformations on Rn. These are usually expressed in terms of square matrices with non-zerodeterminants.

GL(n) = GL(n,R) = {A ∈M(n,R) | det(A) 6= 0}. (34)

An affine transformation is a map on Rn, which maps every line to a line. These are usuallyexpressed by a pair of an invertible square matrix and a vector in Rn. The matrix shows thelinear transformation and the vector does the translation. The set of all affine transformations iswritten as Aff(n). This group can be also expressed in invertible square matrices of size (n+1);Aff(n)⊂ GL(n+1).

Aff(n) :={(

A d0 1

)∣∣∣∣A ∈ GL(n),d ∈ Rn}. (35)

Figure 3: Inclusions of Lie groups

This realization is called a homogeneous ex-pression. The composition of homogeneousexpression is nothing but a multiplication oftwo matrices.

If the determinant of a matrix of GL(n)or Aff(n) is negative, then the correspondingtransformation changes the orientation of ob-jects. We denote the set of orientation preserv-ing transformations by

GL+(n) = {A ∈ GL(n) | det(A)> 0},

Aff+(n) ={(

A d0 1

)∣∣∣∣A ∈ GL+(n),d ∈ Rn}.

We here summarize the inclusion relations ofthese sets of transformations in Figure 3.

Here we add some explanations. In eachleft-right edge, the object on the left is an index two subgroup of the object on the right. Theobject on the left is ‘connected’ while the object on the right is ‘disconnected’. In each verticaledge, the object on the top is the semi-direct product of the object on the bottom with thetranslation group Rn. In each front-behind edge, the object on the front is the subset of rigidtransformations of the object on the behind.

The motion group (or Euclidean motion group), denoted by SE+(n) is a map on Rn preserv-ing the length, angle, and the orientation. Each element of the motion group can be expressedas a pair of a rotation and a translation. The congruence group, denoted by SE(n), is the set

16

Page 17: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

of transformations which preserves the shape, but may change the orientation. A reflection is atypical example of congruence transformation. These classes of transformations are ‘groups’:The successive composition of transformations belongs to the same class of transformation, andthe inverse transformation also does (See Section 2.)

A bounded and closed subset of a vector space is called compact in terms of topology.The set of all rotations is bounded, while the set of all translations is unbounded. In theseeight classes of groups, SO(n) and O(n) are compact, while other six classes of groups are notcompact. The notion of connected and arcwise connected is equivalent in our cases. A maximalconnected subset is called a connected component. We cannot continuously interpolate twoelements in a different connected components. For example, a flip and the identity cannotinterpolate in GL(n).All these eight types of groups are non-commutative for n = 2,3 except for SO(2).

4.2 Semidirect product

Figure 4: Translations are normal

We see that the composition of a rotation,a translation, and the inverse rotation is an-other translation (see, Figure 3).

RαTβ R−α = TRα (β ). (36)

In general, this fact is related with the no-tion of ‘normal subgroup’ and ‘semi-direct’product of subgroups.

Let G be a group. The following con-cepts for G are used to describe the rela-tions among the matrix group appeared inthe course notes:

(i) A subset H of G is called a subgroupif H is closed under the compositionand the inversion,

(ii) A subgroup H of G is called a nor-mal subgroup if the composition g ◦h ◦ g−1 of any h ∈ H and g ∈ G be-longs to H.

For example, the set R3 of translations is a normal subgroup of SE+(3), while the set SO(3) ofrotations centered at the origin is a subgroup of SE+(3) but not normal.

17

Page 18: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Let G be a group, H a subgroup of G, and K a normal subgroup of G. (For example,G = SE+(3),H = SO(3),K = R3.) If the map

H×K 3 (h,k) 7→ hk ∈ G (37)

is a bijective, then G is the semi-direct product, denoted by H nK. Note that hkh−1 ∈ K for anyh ∈ H and k ∈ K, but is not necessarily equal to k. If both H and K are normal subgroups ofG, and hk = kh for all h ∈ H and k ∈ K, and the map (37) is bijective, then G is called a directproduct group H×K. Note that hk = kh if and only if hkh−1 = k. Motion groups and affinetransformation groups are typical examples of semi-direct product groups:

SE+(n) = SO(n)nRn, (38)SE(n) = O(n)nRn, (39)

Aff+(n) = GL+(n)nRn, (40)Aff(n) = GL(n)nRn. (41)

Figure 5: Polar decomposition

This decomposition can be interpreted as, for example,the translation part of a motion has its own meaning,which does not depend on the choice of coordinates andscaling, but a rotation part has some ambiguity, depend-ing on the choice of the origin and that of the coordi-nates.

4.3 Decomposition of the set of matricesOther than (semi-)direct product, several decomposi-tions of matrices are widely used in computer graph-ics. Here we summarize the decompositions which willappear in the later sections.

• Polar decomposition, A = RS, where R is a rota-tion matrix and S is a positive definite symmetric matrix(see Figure 5). The product map

SO(n)×Sym+(n) 3 (R,S) 7→ RS ∈ GL+(n) (42)

is bijective.Note that if we reverse the order

SO(n)×Sym+(n) 3 (R,S) 7→ SR ∈ GL+(n) (43)

18

Page 19: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

then it is still bijective, however gives the different map. We also note that the set Sym+(n) isnot a group; actually, the product of two element in Sym+(n) is not necessarily symmetric.

• Diagonalization of positive definite symmetric matrix: Every positive definite symmetricmatrix X is written as X = RDRT = RDR−1, where R is a rotation matrix in 2D and D is adiagonal matrix whose diagonal entries are all positive. Actually, the diagonal entries of D isthe set of eigenvalues of given X . In general, the map

SO(n)×Diag+(n) 3 (R,D) 7→ RDRT ∈ Sym+(n) (44)

is surjective. Note that this map is not injective. If (R,D) and (R′,D′) expresses the same X ,then there exists a permutation matrix P such that D′ = PDPT . Here a permutation matrix is,by definition, a matrix which has unique non-zero entry 1 in each row and each column. Theinverse and the product of permutation matrices are also permutation matrices. Furthermore, ifD has a distinct diagonal entries, then P is unique. This means that the expression X = RDRT isnot unique, but the freedom choices exist only in the order of eigenvalues of X in the diagonalentries in D.

Figure 6: SVD

• Singular value decomposition (SVD): Every ma-trix A ∈ GL+(2) can be written as A = RαDRβ , whereRα ,Rβ ∈ SO(2) and D is a diagonal matrix with positivediagonal entries (see Figure 6). In general, the productmap

SO(n)×Diag+(n)×SO(n) → GL+(n) (45)(R′,D,R) 7→ R′DR

is surjective. This SVD is a combination of the po-lar decomposition and the diagonalization of positivesymmetric matrix. In fact, if we denote by A = R′Sthe polar decomposition of A, and by S = RDRT , thenthe expression A = (R′R)DR gives SVD. (Notice thatR′R ∈ SO(n).) This enables us to compute SVD bypolar decomposition and the iagonalization of positivesymmetric matrix. On the other hand, when we haveSVD A = R′DR, then A = (R′R)(RT DR) gives polar decomposition of A.

Similarly, SO(n)×Diag(n)× SO(n)→ GL(n) is also surjective. Note that SVD is calledCartan decomposition in mathematical literature. In this point of view, the compactness ofSO(n) and commutativity of Diag(n) is significant.

19

Page 20: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

5 Exponential and logarithm of matrices

5.1 Exponential: definitions and basic propertiesThe exponential of a square matrix A is defined to be

exp(A) =∞

∑n=0

1n!

An = I +A+12

A2 +16

A3 + · · · , (46)

where A0 = I is the identity matrix. We’ll refer to (46) as the matrix exponential, for short. Thisis motivated by Taylor expansion of the usual exponential function

ex =∞

∑n=0

1n!

xn = 1+ x+12

x2 +13!

x3 + · · · . (47)

The series exp(A) converges for an arbitrary A rapidly, as does the usual exponential function.However, this infinite series expression is not so efficient for actual numerical computations.For a computation, we can use several useful properties: for a diagonal matrices we have

exp

a 0 00 b 00 0 c

=

ea 0 00 eb 00 0 ec

, (48)

and a rotation

exp(

0 −θ

θ 0

)=

(cosθ −sinθ

sinθ cosθ

). (49)

In general, the conjugate invariance

exp(P−1AP) = P−1 exp(A)P (50)

enables us to reduce the computation of the exponential map for these two cases.As is Euler’s formula in complex numbers

cosθ + isinθ = exp(iθ) = eiθ (51)

which gives an intimate connection between exponential function and trigonometric functions,the exponential expression (49) of a rotation is not unique; θ +2nπ(n ∈ Z) gives the same rota-tion. This feature makes the inverse complicated; the logarithm is multi-valued. The logarithmmight be defined to be the inverse of the exponential as is the case of the real scalar-valuedfunction

exp : R→{y > 0}= R>0. (52)

However, by the same reason of the logarithm of complex numbers, the logarithm of matricesis not unique. Moreover, the non-commutativity of matrices causes further complications. Wewill come back this issue in later sections.

20

Page 21: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

5.2 Rodrigues’ formula and exponentialEvery 3D rotation is expressed by Rodrigues’ rotation formula:

Rx = exp(A) = exp

0 −x3 x2x3 0 −x1−x2 x1 0

= I +sin |x||x|

A+1− cos |x||x|2

A2, (53)

Figure 7: Lie algebra as a tangent space

where |x| =√

x21 + x2

2 + x33 is the norm of

a vector x = (x1,x2,x3) ∈ R3. The ma-trix Rx shows the rotation around the axisthrough x, and with angle |x| if |x| /∈ 2πZ. If|x| ∈ 2πZ then Rx = I, the identity matrix.The set so(3) of skew-symmetric, that is,the transpose is its minus, 3×3 matrices isregarded as ‘Lie algebra’ of SO(3) (see Fig-ure 7, and Section 2 as well). In the coursenotes, we will not discuss a Lie algebra ax-iomatically but consider it as a linear ap-proximation of a group (more precisely, thegroup means a Lie group in this context, ora matrix group, continuous group, in a clas-sical terminology). In fact, the exponentialmap gives a local diffeomorphism(= one-to-one, onto, smooth) between a neighborhood of the origin of the vector space and a neighbor-hood of the identity of the group (the set of transformations).

5.3 Exponential/logarithm on shearsThe exponential map gives a bijection(= one-to-one onto map)

exp : sym(n)→ Sym+(n), (54)

exp : diag(n)→ Diag+(n), (55)

where

Sym+(n) = {X | symmetric, positive definite},sym(n) = {A | symmetric},

Diag+(n) = {X | diagonal matrices with positive diagonal entries},diag(n) = {A | diagonal matrices}

21

Page 22: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

The explicit form of (55) has been given in (48). The relation between (54) and (55) hasbeen suggested in (44): exp(RXRT ) = Rexp(X)RT for R ∈ SO(n) and X ∈ diag(n).

group vector space commutativeSym+(n) no no nosym(n) no yes yes

Diag+(n) yes no yesdiag(n) no yes yes

The role of linearity (vector space) and of commutativity is discussed in section 5.7. BothSym+(n) and Diag+(n) are convex open subsets of vector spaces.

5.4 Exponential/logarithm on 3D rotationThe exponential map gives a surjection(= onto map):

exp : so(3) = {A | skew-symmetric}→ {X | rotation}= SO(3). (56)

5.5 Exponential map on square matricesThe exponential map

exp : {square matrices}→ GL(n) (57)exp : {A | trace(A) = 0}→ {X | det(X) = 1}= SL(n) (58)

are neither surjective nor injective. Note that the polar decomposition can be considered as anon-linear and non-commutative counter part of a linear and commutative natural decomposi-tion, in the level of vector spaces, into symmetric and skew-symmetric matrices.

5.6 Loss of continuityThe axis of rotation is a natural invariant of 3D rotation. It is not continuous at the originof SO(3). This fact has relation with the failure of the local diffeomorphic property of theexponential function. We will explain with some notations: Let B = {x ∈ R3 | |x| ≤ π}. Thenthe exponential map restricted to B gives a surjective map

exp : B→ SO(3). (59)

It is diffeomorphic on the interior

exp : {x ∈ R3 | |x|< π}→ {R ∈ SO(3) | det(R+ I) 6= 0}. (60)

22

Page 23: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 8: The exponential map of SO(3)

23

Page 24: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

On the boundary, it is two-to-one covering map

exp : {x ∈ R3 | |x|= π}→ {R ∈ SO(3) | det(R+ I) = 0}. (61)

These two (rather distinct) behaviors are understood in a uniform manner (see Figure 8): themap

exp : {x ∈ R3 | 0 < |x|< 2π}→ {R ∈ SO(3) | R 6= I} (62)

gives the two-to-one covering map (everywhere smooth, so that the local inverse does existuniquely). Slightly more generally, for every integer n≥ 1,

exp : {x ∈ R3 | 2(n−1)π < |x|< 2nπ}→ {R ∈ SO(3) | R 6= I} (63)

also gives the two-to-one covering map. This map factors through the map (28):

{x ∈ R3 | 2(n−1)π < |x|< 2nπ} ∼→{q ∈H1 | q 6=±1} 2:1→{R ∈ SO(3) | R 6= I} (64)

On the other hand, the exponential map on the complement is factored as

{x ∈ R3 | |x|= 2nπ} 3 x 7→ (−1)n ∈ {q ∈H1 | q =±1}→ {I ∈ SO(3)}. (65)

Figure 8 illustrates these maps. The first map shows the degeneration of spheres {x ∈R3 | |x|=2nπ}, which looks like circles in the figure, to a point. By the degeneration (candy-wrappingoperation), we obtain H1 from tube-like body {x ∈ R3 | 2(n− 1)π ≤ |x| ≤ 2nπ}. The secondmap collects the isomorphic H1’s for n = 1,2, . . . into one piece. The left and right most pointsin the third stage are 1 and−1 in H1, which were the joint points on the second stage. The thirdmap is the map (28).

We also understand this phenomena by the following animation: consider the rotationaround x-axis with 360 degree and after that the rotation around y-axis with certain degree.It seems to be a continuous move, but we do not have a continuous logarithmic lift of this mo-tion. After the first rotation, the transformation (matrix) ‘remember’ the axis of rotation, so thatthe sudden change of the rotation axis from x-axis to y-axis is considered to be a discontinuousmove. We can prove that if the move is C1 (continuously differentiable, that is, the velocity iscontinuous), then the logarithmic lift exists even the transformation go through the identity.

24

Page 25: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

5.7 The field of blending

Figure 9: Blend in a convex set

A vector space is, by definition, closed under theinterpolation (1− t)× p + t × q and the blendw1 p1 + w2 p2 + · · ·+ wk pk. In a curved space(such as a group), the interpolation and the blendmay not belong to the space again.

The space where we blend or interpolatesomething should be a linear space or a convexsubset of it (see Figure 9). In this sense, the set ofrotation matrices is not appropriate, so that it willbe replaced by the set of skew symmetric matri-ces. The set of positive definite symmetric matri-ces is an open convex subset of the set of symmet-ric matrices. It sounds not bad for blending, butstill the set of symmetric matrices will be better.This is why we once move from one curved spaceto the other by the exponential function (see Figure 10). We also remark that the addition + inthe expression w1 p1+w2 p2+ · · ·+wk pk is a commutative operation: a+b = b+a. If the spaceloses this commutativity, then the interpolation and the blend may not be straight forward. Thelinearity and commutativity are therefore the key to the interpolation and blending. Note that aninterpolation can be considered as a special case of blending; a blend of two things, and weightsis in between 0 and 1. So the non-commutativity is relaxed for interpolation, but non-linearitystill exists.

Figure 10: Interpolation by linearization

25

Page 26: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Applications

Page 27: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

6 2D Affine transformation between two triangles

6.1 Triangles and an affine transformation

Figure 11: Interpolation of triangles

As a simple case, this sectiondeals with interpolating the twoaffine transformations. We notethat interpolating affine transforma-tion itself may have other interest-ing applications; see, for example,[Shoemake94b] and [Alexa02].

First of all, recall that there isa unique affine transformation thatmaps a given triangle to anotherone. Specifically, suppose that we aregiven three points (x1,y1)

T ,(x2,y2)T ,

and (x3,y3)T ∈R2 forming a triangle,

then there is a unique affine transfor-mation x1− x3 x2− x3 x3

y1− y3 y2− y3 y30 0 1

=

x1 x2 x3y1 y2 y31 1 1

1 0 00 1 0−1 −1 1

(66)

which maps three points (1,0)T ,(0,1)T ,(0,0)T ∈R2 into the given three points in this order. Inother words, the set of three points forming a triangle is a principal homogeneous space of theaffine transformation group Aff(2). Suppose that we are given three points (x1,y1)

T ,(x2,y2)T ,

and (x3,y3)T ∈ R2 and want to map them onto (x′1,y

′1)

T ,(x′2,y′2)

T , and (x′3,y′3)

T ∈ R2 in thisorder. Then the following 3×3-matrix

A =

x′1 x′2 x′3y′1 y′2 y′31 1 1

x1 x2 x3y1 y2 y31 1 1

−1

(67)

is of the form

a1,1 a2,1 dxa1,2 a2,2 dy0 0 1

, and represents the requested affine transformation. We de-

note the group of the two-dimensional affine transformations by Aff(2), which are representedby 3× 3-matrices of the above form. Note that all the entries ai j, dx and dy are linear in en-tries of x′j’s. This observation is important in global optimization (see section 7.2). We call

A =

(a1,1 a2,1a1,2 a2,2

)as the linear part and dA = (dx,dy)

T as the translation part of A and consider

27

Page 28: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

them separately for interpolation. Interpolating the translation part can be neglected (see thediscussion in section 7.2). We focus on interpolation of linear transformation here. In gen-eral we may assume that transformation is orientation preserving, that is, it does not “flip” 2Dshapes. We denote the group of the orientation preserving linear transformations by GL+(2),which are represented by matrices with positive determinants.

6.2 Comparison of three interpolation methods

Figure 12: linear interpolation Figure 13: exponential interpolation

We now introduce and compare the following three interpolation methods between the iden-tity matrix and a matrix A ∈ GL+(2).

• AL(t) := (1− t)I + tA, linear interpolation.

• AP(t) := Rtθ SL(t) = Rtθ ((1− t)I + tS), see [Alexa00].

• AE(t) := Rtθ

St = Rtθ exp(t logS), see [Kaji12].

A homotopy of a linear transformation A∈GL+(2) is a series of matrices A(t) parametrizedby time t ∈ R such that A(0) = I and A(1) = A, where I is the identity matrix. These threeAL(t),AP(t), and AE(t) satisfy these properties.

28

Page 29: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

The first one AL gives a linear interpolation in the space of all square matrices M(n). Thismeans that the interpolated matrices can be degenerate (not regular) so that the shape collapses.Both the second and the third interpolations AP and AE use the polar decomposition A = RS([Shoemake94b]), we interpolate the rotation part and the symmtric part independently, andthen get the interpolation of A by multiplying the individual interpolations. In both cases AP

and AE , the rotation factor R = Rθ is interpolated as the angle of the rotation varies linearly.Note that we can take the angle θ to be −π < θ ≤ π , but θ has choice up to modulo 2π ,which may cause a problem. We will discuss this issue in section 7.2. The interpolation at t(t ∈ R) is the t-th power of matrix R, that is, Rt = Rtθ . (This is a simple interpolation examplein a Lie group through linear interpolation in its Lie algebra.) As for symmetric factors S, twointerpolations AP and AE have the different strategy; AP interpolates linearly on S while AE

does linearly on log(S). If we see the special case A = S ∈ Sym+(2), then SP(t) = (1− t)I+ tSand SE(t) = exp(t log(S)) = St . The difference between these two methods is illustrated inFigures 12 and 13. The method AE(t) uses both the polar decomposition and the exponentialmap, and it can be seen as a combination of the ideas in [Alexa02] and [Shoemake94b].

7 Global 2D shape interpolationRather than a simple triangle case in the previou section, we deal with more general 2D shapeinterpolation techniques, where we are given two input shapes: source and target. We thenassume that each shape may be compatibly triangulated5. This means that we assume that eachshape is triangulated, and that one-to-one correspondence is established between the trianglesof the source and target shapes.

There are many approaches, including those mentioned earlier, for 2D shape interpolationunder the above assumptions. A typical scenario of these approaches came from the seminalwork of [Alexa00]: We first define a homotopy of affine maps for each pair of the correspondingtriangles of the source and target objects, such that it connects the identity map and the localaffine map that gives a bijection between the corresponding triangles. Let us call this homotopylocal. Next we construct the homotopy that gives global interpolation between the source andtarget. This homotopy is defined as a family of the piecewise affine maps, each of which isderived from the affine maps of the local homotopy through a certain energy minimizationprocess. This scenario works well and has inspired many research works. However, from apracticality viewpoint, there remain many things to be improved and polished. For example, thefollowing practical aspects of the methods should be addressed: (a) controllability - how to addconstraints to get a better result?; (b) rotation consistency -how to treat large rotations (> 180

5In general, when the two shapes are given without boundary matching nor compatible triangulation, we wouldneed a preprocess to establish them. As for this issue, [Baxter09] is a good reference describing the most relevanttechniques along with their own approach.

29

Page 30: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

degrees)?; and (c) symmetry - Can we make it possible that the vertex paths for interpolationfrom shape A to shape B are the same as from B to A? Recently [Baxter08] gave a formulationof rigid shape interpolation using normal equations, presenting the algorithms that meet theserequirements.

This section presents a mathematical framework for the above homotopic approaches usingaffine maps. We start with analyzing the local affine map directly, and introduce a new local ho-motopy between the affine maps. We also present the algorithms to achieve global interpolation,each of which minimizes an energy function with user-specified constraints. It is also discussedhow the algorithms meet the above practical requirements. We demonstrate that our mathe-matical framework gives a comprehensive understanding of rigid interpolation/deformation ap-proaches. In particular we illustrate the power of this framework with the animation examplesobtained by several different constraint functions.

7.1 FormulationWe now describe the source and target shapes which are compatibly triangulated more explic-itly. To make it, we denote the source shape made of triangles by P = (p1, . . . , pn),(pi ∈ R2),where each pi is a triangle vertex. Similarly we denote the target shape by Q=(q1, . . . ,qn),(qi ∈R2), which are the triangle vertices. The triangles are denoted by τ1, . . . ,τm, where τi ={i1, i2, i3} is the set of the indices of the three vertices. Hence, the i-th source (respectively,target) triangle consists of pi1, pi2 , and pi3 (respectively, qi1,qi2 , and qi3) for i1, i2, i3 ∈ τi.

Through sections 6.1 and 7.2, our local and global interpolation techniques are summarizedas follows:

• (from triangle to affine transformation) For each pair of the source and the target trianglescorresponding to τi, we initially get the affine map, denoted by Ai, that maps the initialtriangle to the target triangle, where Ai ∈ Aff(2) is a 3×3-matrix.

• (local interpolation of linear part) We then construct a homotopy between the 2×2 iden-tity matrix and the linear part Ai of Ai (i.e., from I2 ∈ GL+(2) to Ai ∈ GL+(2)). Thehomotopy is parameterized by t, with 0 ≤ t ≤ 1. The collection {Ai | i = 1,2, . . . ,m} ofaffine maps Ai’s can be considered as a piecewise affine transformation from P to Q (seeits precise definition in section 7.2).

• (global interpolation via error function) We next construct a global homotopy between theinclusion map P ↪→ R2 and the piecewise affine transformation from P to Q, which willbe denoted by {Bi(t) ∈Aff(2) | i = 1,2, . . . ,m} with t ∈R in section 7.2. It is obtained byminimizing a global error function regarding the linear part Bi (of Bi) and Ai along withthe user-specified constraint function.

We have been explained the first and the second procedure. We now explain the final procedure.

30

Page 31: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

7.2 Error function for global interpolationTo achieve global interpolation between the two shapes, we have to assemble local translationsconsidered in the previous section. In our context, this means that we represent a global trans-formation as a piecewise affine transformation. More precisely, we consider a collection ofaffine maps

B(t) := {Bi(t) ∈ Aff(2) | i = 1,2, . . . ,m},(0≤ t ≤ 1)

such that Bi(t)’s are consistent on the edges. More precisely, Bi(t)pk = B j(t)pk for all t when-ever k ∈ τi ∩ τ j. We put B(t)pk = Bi(t)pk for k ∈ τi. Let vk(t) := B(t)pk,(1 ≤ k ≤ n) be theimage of the initial vertices P. The following observation is vital in this section. The piecewiseaffine transformation B(t) which maps pk’s to vk(t)’s is uniquely determined by (67) and its en-tries are linear with respect to vk(t)’s. Therefore, giving B(t) and giving vk(t)’s are equivalentand we identify them and interchange freely in the following argument. See also Section 6. Wealso assume naturally that

• B(t) interpolates P and Q, i.e., vk(0) = pk and vk(1) = qk for all k.

• Bi(t) is “close” to Ai(t), where Bi(t) is the linear part of Bi(t) and Ai(t) is the localhomotopy obtained in the previous section.

• Each Bi(t) varies continuously with respect to t.

We will give a framework to obtain global interpolation from given local homotopies. Fora moment we consider a fixed t. We then introduce two more ingredients other than localhomotopy data;

• a set of local error functions

Ei : M(2,R)×GL+(2,R)→ R≥0, (1≤ i≤ m).

• a constraint functionC : (R2)n→ R≥0.

The local error function Ei is positive definite and quadratic with respect to the entries of thefirst factor M(2,R). Intuitively, it measures how different the given two local transformationsare. The constraint C is also positive definite and quadratic. It controls the global translation.Furthermore, with this function, we can incorporate various constraints on the vertex path as wewill describe later.

If we are given local error functions for each triangle τi,(1 ≤ i ≤ m) and a constraint func-tion, we combine them into a single global error function

Et(B) :=m

∑i=1

Ei(Bi(t),Ai(t))+C(v1(t), . . . ,vn(t)),

31

Page 32: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

where we regard B(t) (or more precisely, the entries of Bi(t) which are linear combinationsof vk(t)’s) as indeterminants to be solved. For each t, the minimizer of Et may have positivedimension in general, however, one can modify the constraint function C such that it becomes asingle point, as we see by concrete examples later. The single minimizer B(t) is the piecewiseaffine map that we take as a global interpolation method.

Efficiency of finding the minimizer: We show that finding the minimizer of a global errorfunction is efficient enough. Since the global error function is a positive definite quadraticform, it can be written as a function of v(t) = (v1(t)x,v1(t)y, . . . ,vn(t)x,vn(t)y)

T ∈ R2n as

E(v(t)) = v(t)T Gv(t)+v(t)T u(t)+ c,

for some (2n× 2n)-symmetric positive definite matrix G, u(t) ∈ R2n, and c ∈ R. We see thatv(t) =−1

2G−1u(t) is the minimizer. Note that G is time-independent and we need to computeG−1 just once for all frames (see [Alexa00]).

7.3 Examples of local error functionsIn the above point of view, we have a flexibility to choose error functions. For example, we cantake

EPi (Bi(t);Ai(t)) := ∑

k∈τi

||Bi(t)pk−Ai(t)pk||2. (68)

EFi (Bi(t),Ai(t)) := ||Bi(t)−Ai(t)||2F , (69)

ESi (Bi(t),Ai(t)) := min

s,δ∈R ∑k∈τi

‖Bi(t)pk− sRδ Ai(t)pk‖2 , (70)

ERi (Bi(t),Ai(t)) := min

s,δ ,∈R‖Bi(t)− sRδ Ai(t)‖2

F . (71)

where the Frobenius norm of a matrix M = (mi j) is defined to be ‖M‖2F = ∑

i, jm2

i j. We now

compare these error functions. The error function EP measure how the intermediate verticesvk(t)’s are different from those obtained by applying the local transformations to the initialvertices. However, this intuitive approach does not produce a good result. We have to speculateon how to define a good error function.

The error function EF is used in [Alexa00]. It measures how the local transformation and thefinal global transformation differ as linear maps. The resulting global error function is invariantunder translation and hence requires two dimensional constraints to get a unique minimizer. Forexample, [Alexa00] proposes the following constraint function:

C(v1(t), . . . ,vn(t)) = ||(1− t)p1 + tq1− v1(t)||2.

32

Page 33: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 14: An example of global interpolation obtained by EFi with the constraints on the

vertices loci indicated by the curves. In the intermediate frames around t = 0.3 and t = 0.6,extreme shrink and flip of triangles are observed.

Figure 15: An example of global interpolation obtained by EFi . To obtain smooth interpolation

between the leftmost and rightmost figures, local transformations should deal with rotationangles larger than π , but EF

i fails to make it.

It produces a fairly satisfactory global transformation when the constraint function is very sim-ple and rotation is “homogeneous.” However, this method fails if (a) we want to put someconstraints (see Figure 14), or (b) the expected rotation angles vary beyond 2π from trianglesto triangles (see Figure 15):

In order to achieve more flexibility of shape deformation and easier manipulation by a user,[Igarashi09] and [Igarashi05] considered error functions which are invariant under similaritytransformation, i.e., rotation and scale. [Werman95] has proposed an error function ES, whichis slightly different from them. It measures how different the two sets of points {Ai(t)pk}and {Bi(t)pk} are up to similarity transformation. In [Igarashi09] and [Igarashi05] they used aconstraint function which forces the vertex loci to be on the specified curves. We will see thedetailed construction later.

For the purpose of finding a best matching global transformation with given local transfor-mations, it is better to use a metric in the space of transformations, rather than in the space ofpoints. The error function ER, which is a slight modification of ES, measures how different

33

Page 34: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 16: An example of global interpolation obtained by ERi with the same input data as

Figure 14. By allowing rotational and scale variance without any penalty in the error function,we can get more flexible control of the output animation.

Figure 17: An example of global interpolation obtained by ERi with the same input data as Figure

15. The proper rotation angles for the local triangles are automatically chosen by minimizingthe global error function.

Ai(t) and Bi(t) are as linear maps up to rotation and scale. The above function ER has a closedform

mins,δ∈R

‖sRδ A−B‖2F = ‖B‖2

F −∥∥B ·AT

∥∥2F +2det

(B ·AT)

‖A‖2F

. (72)

This is positive definite quadratic with respect to the entries of B. Since it is invariant undersimilarity transformation, it avoids the flaws of EF

i in the cases of (a) and (b); Compare Figure16 with Figure 14, and Figure 17 with Figure 15, respectively.

We note that a positive linear combination of positive definite quadratic function is also apositive definite quadratic function. This means that a linear combination of above mentionederror functions is also an error function. This idea can be used for practical improvement. Wegive three examples:

(i) In assembling local error functions, we can take weighted sum instead of ordinary sum.We can put large weights to more important parts (triangles). For example, the more the area oftriangle is, more important its rigidity becomes. Hence, it is reasonable to weight by the areas

34

Page 35: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

of the initial triangles:

Ei← Area(∆(pi1, pi2, pi3))Ei (i1, i2, i3 ∈ τi).

This was already discussed in [Xu05] and [Baxter08] as well.(ii) The local error function ER

i in (71) is employed for a general use. However, we may notwant some parts of the 2D shape to rotate or to scale (such as a face of a character). In suchcases, we can use a balanced local error function

wiEFi (t)+(1−wi)ER

i (t),

where wi ∈ [0,1]. If we put a large wi, the rotation and scale of the triangle τi would be sup-pressed. We thus believe that our framework provides more user controllability over previousapproaches.

(iii) As is shown in [Baxter08], we can symmetrize the interpolation by symmetrizing theerror function. Let Ei(t) be a global error function for a local homotopies Ai(t), and E−1

i (t) bethat for A−1

i (t). Then define a new error function by

E ′i(t) := Ei(t)+E−1i (1− t).

This is symmetric in the sense that it is invariant under the substitution Ai← A−1i and t← 1− t.

That means that the same minimizing solution is given if we swap the initial and the terminalpolygons and reversing time.

7.4 Examples of constraint functionsNow we give a concise list of the constraints we can incorporate into a constraint functionC(v1(t), . . . ,vn(t)). See the demonstration video in [Kaji12].

• Some points must trace specified loci (for example, given by B-spline curves). This isrealized as follows: let uk(t) be a user specified locus of pk with uk(0) = pk and uk(1) =qk. Then add the term ck||vk(t)−uk(t)||2, where ck ≥ 0 is a weight.

• The directions of some edges must be fixed. This is realized by adding the term ckl||vk(t)−vl(t)− ekl(t)||2, where ekl(t) ∈ R2 is a user specified vector and ckl ≥ 0 a weight. Thisgives a simple way to control the global rotation.

• The barycenter must trace a specified locus uo(t). This is realized by adding the termco||1n ∑

nk=1 vk(t)− uo(t)||2, where co > 0 is a weight. This gives a simple way to control

the global translation.

Likewise we can add as many constraints as we want.

35

Page 36: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

8 Parameterizing 3D Positive Affine TransformationsNext we present our 3D application based on the concepts and techniques in sections 4 and 5.So let us consider how to parameterize rigid or non-rigid motions. As we’ve learned, quaternionor Euler angle parameterizes rotations, and dual quaternion with axis-angle presentation param-eterizes the rigid transformation [Kavan08]. These parameterizations are partial: they deal onlywith subsets of Aff+(3), and cannot shear and scale. [Alexa02] tried to give a Euclidean param-eterization of Aff+(3), where his idea lies in the Lie correspondence between Lie group Aff+(3)and its Lie algebra through the matrix exponential map and logarithm. However the method islimited for the translations without negative eigenvectors, while the Lie correspondence onlygarantees local bijectivity.

Having in mind these approaches, we introduce an alternative parameterization of Aff+(3)based on Lie theory [Kaji13]. As described next, our method successfully parameterizes thewhole transformations, giving geometrically meaningful runtime operations.

8.1 The parameterization map and its inverseLet M(3,R) be the set of 3×3-matrices, as usual. We set the 12-dimensional parameter space

se(3)× sym(3),

where

se(3) :={

X =

(X lX0 0

)| X =−XT ∈M(3,R), lX ∈ R3

}is the Lie algebra for the 3-dimensional rigid transformation group SE(3) and sym(3) is the setof 3×3-symmetric matrices (see section 5.3).

Now we define the parametrization map

φ : se(3)× sym(3) → Aff(3) (73)X×Y 7→ exp(X)ι(exp(Y )),

where exp is the matrix exponential defined by (46) in section 5.1 and ι : M(3,R)→M(4,R) isgiven by

ι(B) =(

B 00 1

).

This gives a mathematically well-defined parametrization, since it is surjective and has a con-tinuous inverse as we see below. However, computation by the infinite series of the matrixexponential (46) is very slow, and hence, we need to develop an efficient algorithm for our ap-plications. In the next section, we will discuss the fast and explicit formula for the computation.

36

Page 37: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

While the above map φ is not one-to-one, we can compute its continuous inverse explicitly,thanks to the Cartan decomposition theorem. The inverse map ψ is given by

ψ : Aff(3) → se(3)× sym(3) (74)

A 7→ log(A ι(√

AT A)−1)× log(√

AT A).

Note that AT A is symmetric positive definite so that the square root is uniquely determined andthe logarithm is also well-defined (it is calculated by [Denman76] and [Cheng01], for example).Note also that A ι(

√AT A)−1 is an element in SE(3) and the logarithm is defined up to modulo

2π . We discuss the explicit formulae in the next section.

8.2 The algorithmFirst, we consider how to compute (74). Note that AT A is a positive definite symmetric matrixso that it is diagonalized as

P

λ1 0 00 λ2 00 0 λ3

PT

with some orthogonal matrix P and λi > 0. Then we can compute

log(√

AT A) = P

log(√

λ1) 0 00 log(

√λ2) 0

0 0 log(√

λ3)

PT .

Let R = A ι(√

AT A)−1. Since R ∈ SE(3), we can write R =

(R dR0 1

). By mimicking the

famous Rodrigues’ formula [Brockett84] for the rotation matrices, we have

log(R) =(

X lX0 0

),

where X =θ

2sinθ(R−RT ), θ = cos−1

(Tr(R)−1

2

), and

lX =

(I3−

12

X +2sinθ − (1+ cosθ)θ

2θ 2 sinθX2)

dR.

Here we have indeterminacy of cos−1 up to modulo 2π . However, if we impose continuity, wecan take one explicit choice. (An explicit code will be given in [Kaji].)

37

Page 38: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Next, we consider how to compute (73). For any symmetric matrix Y ∈ sym(3), any matrixfunction can be computed using diagonalization. However, we introduce a faster algorithm tocompute the exponential based on the spectral decomposition (see [Moler03], for example).This is because, in most applications, we need to compute (74) only once as pre-computation,while computing (73) many times in real-time.

Let λ1,λ2,λ3 be the eigenvalues of Y ∈ sym(3). They are the roots of the characteristicpolynomial of Y :

λ3−Tr(Y )λ 2 +

Tr(Y )2−||Y ||2F2

λ −det(Y ), (75)

where ||Y ||F is the Frobenius norm of Y . Note that computing eigenvalues is much faster thancomputing diagonalization. We therefore can compute the exponential of Y as a degree twopolynomial of Y rather than the infinite Taylor series. When all the three eigenvalues are same,put

a = exp(λ1),b = c = 0.

When two of them are same, say λ1 = λ2, put

s = exp(λ2)/(λ2−λ3), t = exp(λ3)/(λ2−λ3),a = s− t,b = tλ2− sλ3,c = 0.

When all of them are distinct, put

s = exp(λ1)/(λ1−λ2)(λ1−λ3),

t = exp(λ2)/(λ2−λ3)(λ1−λ2),

u = exp(λ3)/(λ2−λ3)(λ3−λ1),

a = sλ2λ3− tλ3λ1−uλ1λ2,

b = −s(λ2 +λ3)+ t(λ3 +λ1)+u(λ1 +λ2),

c = s+ t +u.

Then we haveexp(Y ) = aI3 +bY + cY 2. (76)

Finally, for X =

(X lX0 0

)∈ se(3), again by mimicking Rodrigues’ formula, we have

exp(X) =

(R d0 1

),

whereR = I3 +

sinθ

θX +

1− cosθ

θ 2 X2,

and

d =

(I3 +

1− cosθ

θ 2 R+θ − sinθ

θ 3 R2)

lX .

38

Page 39: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 18: The red icons show the probe-based deformer: (left) initial positions of the probes;(right) the target shape is deformed according to user’s manipulation of the probe icons.

8.3 Deformer applicationsNext we explain the algorithm of our deformers. The input is:

• a target shape to be deformed,

• a set of affine transformations {Ai ∈ Aff(3) | 1≤ i≤ m},

• and weight functions on the vertices (or the simplex) {wi : V → R | 1≤ i≤ m}, where Vis the set of the vertices (or the simplex) of the target shape.

With the above data, we deform the given shape by the following map:

V 3 v 7→m

∑i=1

φ(wiψ(Ai))v, (77)

where we think of the vertex positions v ∈ R3 as column vectors and the matrices multiplyfrom the left. When we take V as the set of simplex, the above formula gives non-consistentmap on the edges, and we need to patch them by certain energy minimizing technique such asARAP[Alexa00]. Among the good properties of our parametrization is that ∑

mi=1 φ(wiψ(Ai)) is

rigid when Ai’s are.Considering the these things, we demonstrate the following defomer applications.

8.3.1 Probe-based deformer

Suppose that a target shape is given. We then assign any number of “probes” which carrytransform data. For example, see Figure18, where the red icons means the probes. If the

39

Page 40: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 19: Vortex by probe-based deformer: left initial; right obtained result.

probes are transformed by the user, the target shape will accordingly be deformed, as shown inFigure 18. More precisely, each probe detects the affine map Ai ∈Aff(3) which transforms it tothe current position from the initial position. A vertex v ∈R3 on the target shape is transformedby equation (77), where the weights wi’s are either painted manually, or computed automaticallyfrom the distance between v and the probe location. Figure 19 shows another example fordesigning a vortex shape.

8.3.2 Cage-based deformer

Suppose that a target shape is given along with a “cage” surrounding it. The cage can be anytriangulated polyhedron wrapping the target shape. We want to deform the target shape bymanipulating not directly on it but through proxy cage (see [Ju05]). Our parametrization can beused in this framework. A tetrahedra is associated with each face triangle by adding its normalvector. Then each face detects the affine map Ai ∈Aff(3) which transforms the initial tetrahedrato the current tetrahedra. A vertex v ∈ R3 on the target shape is transformed by equation (77),where the weights wi’s are either painted manually, or computed automatically from the distancebetween v and the center of the face. For automatic weight computation, it is better to set wi = 0when v sits in the outer half space of the i-th face (see Figure 20).

Figure 20: Cage-based deformer: (left) initialize the cage that surrounding the target; (right) thedeformed result by user’s manipulations on the cage.

40

Page 41: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

9 Crowd control and orthogonal transformationsAnimating crowds or flock has been a long challenge in computer graphics since the seminalwork by Craig Reynolds [Reynolds87]. In this section, we show a recent progress on crowdmodeling by Shigeo Takahashi and his colleauges[Takahashi09], which presents a group for-mation method for a set of individual characters, such as a marching band formation shown inFigure21.

Figure 21: A marching band formation in [Takahashi09]

The key idea in this method is to describe dynamic group formation as rotation interpolationof the eigenbases for the Laplacian matrices, which describes how the individuals are clusteredin a given keyframe formation (see Figure22). As explained next, the key idea will be clearlydescribed using our formulation that we have developed.

Let n be the number of characters in a group. The location of n objects in 2D can beexpressed as a matrix in M(2,n,R), which we denote the set of 2× n matrices with entries inR. We also asign the Laplacian matrix, which is a positive definite symmetric matrix of size n,expressing the adjacency relationship among individuals.

Suppose we have been given two group formations XS and XT , and consider the problemto interpolate the source formation XS and the target formation XT , respecting the formationstructure. The proposal method in the mentioned paper [Takahashi09] is the following: LetLS and LT be the Laplacian matrices constructed from the input data XS and XT , respectively.Using the diagonalization of Laplacian (44), there exist S,T ∈ SO(n) and diagonal matrices DSand DT such that LS = SDSST and LT = T DT T T , respectively. Here the diagonal entries, whichare the eigenvalues of S and T , are arranged in the increasing order. Let R = T S−1 ∈ SO(n). Weput M(t) = RtS, which interpolates M(0) = S and M(1) = T inside the special orthgonal SO(n).The power function Rt is defined by using the logarithm of R in the Lie algebra so(n) and the

41

Page 42: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 22: Expression of formation by Laplacian eigenvectors in [Takahashi09]

exponential function as is explained in Section 5.

Rt = exp(t log(R)). (78)

We put ZS = XSS−1, and ZT = XT T−1, then From ZS and ZT in M(2,n,R), we define an inter-polation Z(t) by

(1, i)ZS = (zSk)1≤k≤n,

(1, i)ZT = (zT k)1≤k≤n,

(1, t)Z(t) = (zk(t))1≤k≤n,

zSk = rSkeiθSk ,

zT k = rT keiθT k ,

zk(t) = rk(t)eiθk(t),

rk(t) = (1− t)rSk + trT k,

θk(t) = (1− t)θSk + tθT k.

This looks a bit complicated, but can be summarized in a word as follows: M(2,n,R) can beidentified with M(1,n,C) = Cn. The interpolation is done in entry-wise in C ⊃ C× and by alinear interpolation in polar coordinates C× ∼=R>0×R. Note that C× = GL(1,C) and the polardecomposition of GL(1,C) is z = z

|z| ×|z|, that is, the multiplication map

{eiθ | θ ∈ R}×{r ∈ R | r > 0}→ GL(1,C) (79)

is bijective.

42

Page 43: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Figure 23: Linear and polar interpolation in[Takahashi09]

There are freedom of choice, theeigenvalue reordering, the signatureof eigenvectors, and orientation pre-serving, which are discussed in thepaper. We can regard this proce-dure also by the matrix factorizationsand the cotrol the ambiguity of loga-rithm of matrices in a uniform man-ner. Using the interpolation M(t) offrames and the interpolation Z(t) ofcoefficients, we obtain an interpola-tion X(t) = Z(t)M(t) of group forma-tions, which satisfies X(0) = ZSS = XS, X(1) = ZT T = XT , as is expected.

The crowd formation example provides a frame interpolation technique. This means that[Takahashi09] gives a key-framing method for the coordinate systems over time, rather than amethod of motion description in a fixed coordinate system.

10 Further readings

Motion description with diffeomorphismsHow do we describe motion/deformation of objects in Rn? We have shown the following ex-amples:

• local: a linear map approximate well (enough).

• global: the set of linear maps (an approximation).

For global deformation, introducing a diffeomorphism (smooth bijective map) may also give usa natural and wider framework of Lie group approaches. We then note that the set of all dif-feomorphisms for a given surface (or manifold) constitutes an infinite-dimensional Lie group,where the multiplication is defined as composite of the diffeomorphisms. Unfortuantely aninfinite-dimensional Lie group is still difficult to understand with the current mathematics, al-though many attempts have been done. For example, [Mumford10] gives a good introductionto this general framework, focusing on morphing between two 2D images as input.

map transformation (Lie) grouplinear local single

piecewise linear global finitely manydiffeomorphism global infinite-dimensional

43

Page 44: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

Lie group applicationsQuaternion is a useful tool for controlling rotation. This also suggests that quaternion is pow-erful in camera control. [Shoemake94a] proposed a solution of the camera twist problem usingquaternions, where H1 is treated as a fiber bundle, which means that H1 is locally homeomor-phic to a direct product: (an open subset of 2d sphere)× (1d circle).

Recently the Lie group integrators have been applied to computer animation: [Kobilarov09]provides a holonomic system for vehicle animations, and [Tournier12] presents a control systemproviding trade-off between physical-simulation and kinematics control using a metric interpo-lation and real-time animation. The latter one uses PGA, as described next.

Principal geodesic analysis (PGA [Fletcher04]) provides a new statistical shape analysismethod for data manifold. The data manifold typically means the collection of shape data,such as of hippocampus in medical imaging [Fletcher04], or the pose manifold of a notioncapture sequence in computer animation [Tournier12]. As is well known, Principal ComponentAnalysis (PCA) is a standard technique for dimension reduction of statistical data lying on aEnclidian space. PGA is a generalization of this technique for curved data manifold. In PGA theconcept of Lie group plays a fundamental role and it acts on the data manifold as a symmetricRiemaninan manifold.

Finally, for a more mathematical aspect of Lie groups and Lie algebras, we would like torefer to the classical literatures: [Helgason78] and [Knapp96]. Though those are a bit far fromgraphics applications, you can consult them to know more about the basic ideas in Lie theory,which we believe will be quite useful for further graphics research.

44

Page 45: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

AcknowledgementsThis work was supported by Core Research for Evolutional Science and Technology (CREST)Program “Mathematics for Computer Graphics” of Japan Science and Technology Agency(JST). The authors are grateful to S. Kaji at Yamaguchi University, Y. Mizoguchi, S. Yokoyama,H. Hamada, and K. Matsushita at Kyushu University and S. Hirose at OLM Digital for theirvaluable discussions. The authors also wish to thank A. Kimura, G. Liu and Y. Kurihara fortheir editing help.

References[Alexa00] M. Alexa, D. Cohen-Or and D. Levin, As-rigid-as-possible shape interpolation. In

Proc. SIGGRAPH2000, 157–164. 2000.

[Alexa02] M. Alexa, Linear combinations of transformations, ACM Trans. Graph., 21, 380–387, 2002.

[Baxter08] W. Baxter, P. Barla and K. Anjyo, Rigid shape interpolation using normal equations.In Proceedings of the 6th international symposium on Non-photorealistic animation andrendering, NPAR ’08, 59–64, 2008.

[Baxter09] W. Baxter, P. Barla and K. Anjyo, Compatible Embedding for 2D Shape Animation.IEEE Trans. Vis. Comput. Graph. 15(5), 867–879, 2009.

[Brockett84] R. W. Brockett, Robotic Manipulators and the Product of Exponentials Formula,Mathematical Theory of Networks and Systems, Lecture Notes in Control and InformationSciences58, 120–129, 1984.

[Chaudhry10] E. Chaudhry, L.H. You and J.J. Zhang, Character Skin Deformation: A Survey,In: Proceedings of Seventh International Conference on Computer Graphics, Imaging andVisualization (CGIV2010), 41–48, IEEE, 2010.

[Cheng01] S. H. Cheng, N. J. Higham, C. S. Kenney and A. J. Laub, Approximating the Log-arithm of a Matrix to Specified Accuracy, SIAM J. Matrix Anal. Appl. 22(4),1112–1125,2001.

[Denman76] E. D. Denman and A. N. Beavers, The Matrix Sign Function and Computationsin Systems, Appl. Math. Comput. 2(1), 63–94, 1976.

[Duistermaat1999] J. J. Duistermaat and J. A. C. Kolk, Lie Groups, Springer, Universitext,1999.

45

Page 46: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

[Ebbinghaus91] H.-D. Ebbinghaus, H. Hermes, F. Hirzebruch, M. Koecher, K. Mainzer, J.Neukirch, A. Prestel and R. Remmert, Numbers, Graduate Texts in Mathematics, Springer1991.

[Fletcher04] P. T. Fletcher, C.Lu, S.M. Pizer and S. Joshi, Principal geodesic analysis for thestudy of nonlinear statistics of shape, IEEE Trans. Med. Imaging 27(8): 995-1005. 2004.

[Hanson06] A. Hanson, Visualizing Quaternions, Elsevier 2006.

[Helgason78] S. Helgason, Differential Geometry, Lie Groups, and Symmetric Spaces, Aca-demic Press, 1978, reprinted by the American Mathematical Society, 2001.

[Igarashi05] T. Igarashi, T. Moscivich, and J. F. Hughes, As-rigid-as-possible shape manipula-tion. ACM Trans. Graph. 24(3), 1134–1141, 2005.

[Igarashi09] T. Igarashi and Y. Igarashi, Implementing as-rigid-aspossible shape manipulationand surface flattening, J. Graphics, GPU, & Game Tools 14 (1), 17–30, 2009.

[Ju05] T. Ju, S. Schaefer and J. Warren, Mean Value Coordinates for Closed Triangular Meshes,ACM Trans. Graph. 24(3), 561–566, 2005.

[Kaji12] S. Kaji, S. Hirose, S. Sakata, Y. Mizoguchi, and K. Anjyo, Mathematical analysis onaffine maps for 2D shape interpolation, Proc. SCA2012, 71–76, 2012

[Kaji13] S. Kaji, S. Hirose, H. Ochiai, and K. Anjyo, A Lie theoretic parameterization of affinetransformations, Proc.MEIS2013, Symposium: Mathematical Progress in Expressive Im-age Synthesis, MI Lecture Note Series Vol. 50, 134–140, 2013.

[Kaji] S. Kaji, S. Hirose, H. Ochiai and K. Anjyo, A Concise Parametrization of Affine Trans-formation, in preparation.

[Kavan08] L. Kavan, S. Collins, J. Zara, and C. O’Sullivan, Geometric skinning with approxi-mate dual quaternion blending, ACM Trans. Graph., 27, 4, Article 105, 2008.

[Knapp96] A. Knapp, Lie Groups, beyond an Introduction, Birkhäuser, 1996.

[Kobilarov09] M. Kobilarov, K. Crane and M. Desbrun, Lie group integrators for animationand control of vehicles, ACM Trans. Graph. 28, Article 16, 2009.

[Lewis00] J. P. Lewis, M. Cordner and N. Fong, Pose space deformation: A unified approachto shape interpolation and skeleton-driven deformation, In Proceedings of the 27th annualconference on Computer graphics and interactive techniques, SIGGRAPH 2000, 165–172, 2000.

46

Page 47: Mathematical Description of Motion and Deformationmcg.imi.kyushu-u.ac.jp/upfiles/100_1386059017_1.pdf2 Preliminaries: A few mathematical concepts Affine transformation (or geometric

[Moler03] C. Moler and C. van Loan, Nineteen Dubious Ways to Compute the Exponential ofa Matrix, Twenty-Five Years Later, SIAM Rev.45(1), 3–49, 2003.

[Mumford10] D. Mumford and A. Desoineux, Pattern Theory, A K Peters, 2010.

[Nieto13] J. R. Nieto and A. Susín, Cage Based Deformations: A Survey, In: DeformationModels, M. G. Hidalgo, A. M. Torres and Javier Varona Gómez (eds.) Lecture Notes inComputational Vision and Biomechanics 7, 2013

[Reynolds87] C. R. Reynolds, Flocks, herds and schools: A distributed behavioral model, In:Proc. SIGGRAPH 87, 25–34, 1987.

[Shoemake85] K. Shoemake, Animating rotation with quaternion curves, In Proceedings of the12th annual conference on Computer graphics and interactive techniques, ACM Press,245–254, 1985.

[Shoemake94a] K. Shoemake, Fiber Bundle Twist Reduction, In Graphics Gems IV AcademicPress, 230–239, 1994.

[Shoemake94b] K.Shoemake, Quaternions, http://www.cs.ucr.edu/~vbz/resources/quatut.pdf, 1994.

[Takahashi09] S. Takahashi, K. Yoshida, T. Kwon, K. H. Lee, J. Lee, and S.Y. Shin, Spectral-based group formation control, Comput. Graph. Forum 28(2), 639–648. 2009.

[Tournier12] M. Tournier and L. Revéret, Principal geodesic dynamics. Proc. SCA2012, 235–244, 2012.

[Vince11] J. Vince, Quaternions for Computer Graphics, Springer, 2011.

[Watt92] A. Watt and M. Watt, Advanced Animation and Rendering Techniques, Addison Wes-ley, 1992.

[Werman95] M. Werman and D. Weishall, Similarity and affine invariant distances between 2dpoint sets, IEEE Transactions on Pattern Analysis and Machine Intelligence 17, 810–814,1995.

[Xu05] D. Xu, H. Zhang, Q. Wang and H.Bao, Poisson shape interpolation. Proceedings of the2005 ACM symposium on Solid and physical modeling, SPM ’05, ACM Press, 267–274,2005.

47