* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Mathematical Description of Motion and Deformation
Survey
Document related concepts
System of linear equations wikipedia , lookup
Jordan normal form wikipedia , lookup
Symmetric cone wikipedia , lookup
Determinant wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Gaussian elimination wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Four-vector wikipedia , lookup
Matrix calculus wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Rotation matrix wikipedia , lookup
Transcript
Mat he mat i c alDe s c r i pt i onofMot i ona ndDe f or mat i on –Fr om Ba s i c st oGr aphi c sAppl i c at i ons– Hi r oyuk i Oc hi a ia ndKe nAnj y o S I GGRAPH As i a2 0 1 3 Cour s eNot e s Ve r . 1 . 1: Se ve r alt yposf i xe d( 2 0 1 3 . 1 2 . 0 3 ) Ve r . 1 . 0:ACM Di gi t alLi br ar yve r s i on( 2 0 1 3 . 1 1 . 1 9) About the authors: Hiroyuki Ochiai: Professor, Institute of Math-for-Industry, Kyushu University, Japan. He received his Ph.D. in mathematics in 1993 from the University of Tokyo. His research interests include representation theory of Lie groups and Lie algebras, algebraic analysis and group theory. He has been joining the CREST project Mathematics for Computer Graphics led by Ken Anjyo since 2010: http://mcg.imi.kyushu-u.ac.jp/ Ken Anjyo: R&D supervisor at OLM Digital. His research interest focuses on construction of the mathematical and computationally tractable models, several of which were presented with his SIGGRAPH/IEEE CG&A papers. He is also a VES member since 2011. http: //anjyo.org Contents 1 Introduction 5 2 Preliminaries: A few mathematical concepts 6 3 Rigid Motion 3.1 Rotation in 2D . . . . . . . . . . . . . . . . . . . . . 3.2 Translation in 2D . . . . . . . . . . . . . . . . . . . 3.3 Reflections in 2D . . . . . . . . . . . . . . . . . . . 3.4 3D rotation: axis-angle . . . . . . . . . . . . . . . . 3.5 3D rotation: Euler angle . . . . . . . . . . . . . . . 3.6 3D rotations: Quaternions . . . . . . . . . . . . . . . 3.6.1 Several equivalent definitions of quaternions 3.6.2 Unit quaternions . . . . . . . . . . . . . . . 3.7 Dual quaternion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 9 10 11 12 12 13 13 14 15 4 Non-rigid transformation 4.1 Several classes of transformations . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Semidirect product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Decomposition of the set of matrices . . . . . . . . . . . . . . . . . . . . . . . 15 16 17 18 5 Exponential and logarithm of matrices 5.1 Exponential: definitions and basic properties 5.2 Rodrigues’ formula and exponential . . . . 5.3 Exponential/logarithm on shears . . . . . . 5.4 Exponential/logarithm on 3D rotation . . . 5.5 Exponential map on square matrices . . . . 5.6 Loss of continuity . . . . . . . . . . . . . . 5.7 The field of blending . . . . . . . . . . . . . . . . . . . 20 20 21 21 22 22 22 25 6 2D Affine transformation between two triangles 6.1 Triangles and an affine transformation . . . . . . . . . . . . . . . . . . . . . . 6.2 Comparison of three interpolation methods . . . . . . . . . . . . . . . . . . . 27 27 28 7 Global 2D shape interpolation 7.1 Formulation . . . . . . . . . . . . . . 7.2 Error function for global interpolation 7.3 Examples of local error functions . . . 7.4 Examples of constraint functions . . . 29 30 31 32 35 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 9 Parameterizing 3D Positive Affine Transformations 8.1 The parameterization map and its inverse . . . . 8.2 The algorithm . . . . . . . . . . . . . . . . . . . 8.3 Deformer applications . . . . . . . . . . . . . . 8.3.1 Probe-based deformer . . . . . . . . . . 8.3.2 Cage-based deformer . . . . . . . . . . . Crowd control and orthogonal transformations 10 Further readings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 36 37 39 39 40 41 43 4 1 Introduction While many technical terms, such as Euler angle, quaternion, and affine transformation, now become quite popular in computer graphics, their graphical meanings are sometimes slightly different from the original mathematical entities, which might cause misunderstanding or misuse of the mathematical techniques. This course presents an intuitive introduction to several mathematical concepts that are quite useful for various aspects of computer graphics, including curve/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 concepts and the practical meanings in computer graphics without assuming any prior knowledge of pure mathematics. We then focus on the mathematics for matrices, while we know there are so many other mathematical approaches far beyond matrices in our graphics community. Thoguh this course limited the topics to matrices, we hope you can easily understand and realize the power of mathematical approaches. In addition this course demonstrates our ongoing work, which is benefitted from the mathematical formulation presented in this course. The organization of the course notes is as follows. We start with a brief introduction of the mathematical concepts about matrices that have been used in graphics. Next we explain the basic definitions regarding the matrix group. These mathematical concepts will be demonstrated in the later application sections. In particular we provide several useful recipes for rigid motion description and global deformation, along with our recent work. Finally we show a list of further readings, suggesting that the power of mathematical approaches in graphics cannot be exhausted in this course. 5 2 Preliminaries: A few mathematical concepts Affine transformation (or geometric transformation) gives a basic mathematical framework for geometric operations in computer graphics, such as rotation, shear, translation, and their compositions. Each affine transformation is then represented by 4 × 4-homogeneous matrix with usual operations: addition, scalar product, and product. While the product means the composition of the transformations, geometric meanings of addition and scalar product are not trivial. We often want to have geometrically meaningful weighted sum (linear combination) of transformations, which is not an easy task. These kinds of practical demands therefore have inspired graphics researchers to explore new mathematical concepts and/or tools. Many works have been conducted 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. In constrast, dual quaternion and axis-angle presentation are useful in rigid transformation (rotation and translation altogether). These mathematical concepts have become quite popular and have a success to some extent in our graphics community. In this section we therefore take a brief look at the original mathematical meanings of these concepts related with matrices, which will be useful when we reuse or extend the basic ideas behind those concepts. The mathematical definitions given below might be hard to make out at first. But don’t worry. You’ll soon understand 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 the following 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. (The element 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 is the 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 of all 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 linear group of order n, and will be denoted by GL(n, R) or GL(n, C). 6 • quaternion: The original definition of quaternion by William Hamilton seems a bit different from the one we use in graphics. In 1835 he justified calculation for complex numbers x + iy as those for ordered pairs of two real numbers (x, y). He therefore wanted to find a new concept of numbers in higher dimensions, rather than treating rotation around an axis. In 1843 he finally discovered it, referring to the totality of those numbers as Quaternions. 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 = −1 i j = − ji = k H is then called an algebra or field (see [Ebbinghaus91] for more details). We also note that, as shown in the above rules, it is not commutative. A few more alternative definitions of Quaternions will also be given later for our graphics applications. In particular we’ll see how 3D rotations can be represented with quaternions of unit length. • Dual Quaternion: In 1873, as a further generalization of quaternions, William K. Clifford 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 introduced in the late 19th century. A dual quaternion can be represented with q = q0 + qε ε, where q0 , qε ∈ H and ε is the dual unit (i.e., ε commutes with every element of the algebra, while satisfying ε 2 = 0). We’ll see later how rigid motions in 3D space can be represented with dual quaternions of unit length. • Lie group and Lie algebra: A Lie group is a group and smooth manifold (i.e. locally it is diffeomorphic to n-dimensional open disk). The matrix groups, like GL(n, R) for instance, are examples of a real(-valued) Lie group. The totality of quaternions of unit length 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 this sense, the Lie algebra can be considered as a linear approximation of the Lie group, which will be more explicitly described for the matrix groups in the following sections. 7 Basics 3 Rigid Motion In physics, a rigid body means as an object which preserves the distances between any two points of it with or without external forces over time. So decribing rigid motion means finding the non-flip congruence transformations parameterized over time. For instance, in treating a 3D rigid body X, we need to find the family S(t) of the non-flip congruence transformations parameterized by t such that X(t) ≡ X, where X(t) denotes the position of X at time t. In the following sections, a non-flip congruence transformation may also be called a rigid transformation. The totality of the rigid transformations constitues a group, which will be denoted by SE + (n), where n is the dimension of the world where rigid bodies live (n = 2 or 3). So let’s start with 2D rotation, a typical rigid transformation in R2 . 3.1 Rotation in 2D A rotation in 2D centered at the origin is then expressed by a matrix cos θ − sin θ Rθ = . sin θ cos θ (1) Note that the angle θ is not unique. Rθ and Rθ 0 give the same rotation if and only if θ − θ 0 is an integer multiple of 2π. The compositions of two rotations and the inverse of a rotation are again rotations: Rθ Rθ 0 = Rθ +θ 0 , 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) SO(2) = {A ∈ M(2, R) | AAT = I, det A = 1}, (3) We also write as where M(2, R) is the set of square matrices of size two, and det is the determinant. The transpose1 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 A is a rotation matrix. This means that an orthogonal matrix sends any orthonormal basis with the positive 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 fact comes from the commutativity; Rθ Rθ 0 = Rθ 0 Rθ . Note that this never be true for 3D or higher dimensional case. 1 There 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 choice to write the transpose of a matrix A will be tA. 9 3.2 Translation in 2D A translation Tb by a vector b ∈ R2 also gives a rigid transformation in 2D. The composition of two translations and the inverse of a translation also are translations: Tb Tb0 = Tb+b0 , Tb−1 = T−b . This can be rephrased as ‘the totality of translations forms a commutative group’ (recall sect 2. The translation Tb does not preserve the origin (unless b is a zero vector), so it cannot be naturally expressed by a 2 × 2 matrix. A homogeneous expression can express both translations and rotations in 3 × 3 matrices. 0 x x a11 a12 b1 a21 a22 b2 y = y0 . (4) 1 1 0 0 1 A successive operation of a rotation Rθ and a translation Tb maps a column vector x = (x, y)T ∈ R2 to Tb (Rθ (x)) = Rθ x + b. In a homogeneous expression, it is written as 0 Rθ b x x = . (5) 0 1 1 1 If we reverse the order of composition of a translation Tb and a rotation Rθ , the result Rθ Tb is different from Tb Rθ . To be more precise, we have Rθ Tb = Tb0 Rθ with b0 = Rθ (b). (6) Note that the rotation component Rθ does not depend on the order of composition, while the translation part Figure 1: 2D rigid motion Tb or Tb0 does. This fact can be rephrased as ‘the rigid motion 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) n R2 for short. Note that equation (6) can be written as Rθ Tb R−θ = Tb0 , (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 rotation with angle θ centered at b ∈ R2 can be expressed by Tb Rθ T−b . 2 This notion is explained in Section 4.2. 10 (8) 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 α β z z , (9) = 1 0 1 1 where α = eiθ = cos θ + i sin θ , and β = b1 + b2 i ∈ C. 3.3 Reflections in 2D A reflection (flip) with respect to a line y = (tan θ )x through the origin can be expressed as 1 0 cos 2θ sin 2θ Rθ R = . (10) 0 −1 −θ sin 2θ − cos 2θ In complex variables, z 7→ eiθ e−iθ z = e2iθ z = ze−2iθ . A reflection is orientation-reversing transformation which preserves the shape. The determinant of the matrix (10) is −1. The composition of two reflections is a rotation, and the resulting rotation depends on the order of compositions of reflections: cos 2θ sin 2θ cos 2θ 0 sin 2θ 0 = R2θ −2θ 0 . (11) sin 2θ − cos 2θ sin 2θ 0 − cos 2θ 0 The totality of rotations and reflections form ‘an orthogonal group’ of size two, which is defined by O(2) = {g ∈ M(2, R) | ggT = I2 }. (12) The totality of rotations, which is denoted by SO(2) = {g ∈ O(2) | det(g) = 1}, (13) is a normal subgroup of O(2) with inFigure 2: Connected components dex two: [O(2) : SO(2)] = 2. A reflection is not usually considered to be a motion, since it cannot be continuously conncted with the identity transformation. In other words, O(2) is not connected while SO(2) is connected. The set of reflections is another connected component of O(2). 11 3.4 3D rotation: axis-angle So far, we have discussed 2D rotaions and flips. We now consider a 3D rotation. Given a unit vector u ∈ R3 and the rotation angle θ , the rotation is given by x 7→ Rx = x0 = (cos θ )x + (sin θ )(u × x) + (1 − cos θ )(u · x)u. (14) Also matrix notation 0 −u3 u2 0 −u1 + (1 − cos θ )(uuT − I). R = I + (sin θ ) u3 −u2 u1 0 (15) If we choose an orthonormal basis {u, v, w} of R3 with the right orientation, that is, w = u × v, then u0 = (cos θ )u + (1 − cos θ )u = u, v0 = (cos θ )v + (sin θ )(u × v) = (cos θ )v + (sin θ )w, w0 = (cos θ )w − (sin θ )v. The rotation (14) is expressed as u1 v1 w1 1 0 0 u1 u2 u3 R = u2 v2 w2 0 cos θ sin θ v1 v2 v3 . u3 v3 w3 0 − sin θ cos θ w1 w2 w3 (16) (17) (18) (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 is a 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 a rotation is also a rotation, we can say that “the set of rotations is a group”. 3.5 3D rotation: Euler angle The second method to express 3D rotations is so-called ‘Euler angle’, the composition of three successive rotations along the coordinate axes: Rz (θ3 )Ry (θ2 )Rx (θ1 ) cos θ3 − sin θ3 0 cos θ2 0 sin θ2 1 0 0 1 0 0 cos θ1 − sin θ1 . = sin θ3 cos θ3 0 0 0 0 1 − sin θ2 0 cos θ2 0 sin θ1 cos θ1 The feature of Euler angle method is; 12 (21) • 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 3.6.1 3D rotations: Quaternions Several equivalent definitions of quaternions Some deficiency of Euler angle is relaxed by using quaternions. We now here briefly recall the quaternions. 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 form a −b −c −d b a −d c . c d a −b d −c b a (iv) A subalgebra of M(2, C), consisting of the matrices of the form z −w . w z (22) (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 pircture (iii) and (iv) the multiplication rule is inherited from the matrix multiplication, so that the distribution property q(q0 +q00 ) = qq0 +qq00 is quite obvious, while in the picture (i) the multiplication 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 we remark rather fancy relation w j = jw for w = C = R + Ri. The multiplicativity |qq0 | = |q| · |q0 | of norms of quaternions follows from the property of derminant det(AB) = det(A) det(B) in the picture (iv). The realization (v) is most directly related with the description of 3D motion 13 (e.g., 3D rotation by unit quaternion). It should be emphasized that these five realizations are equivalent. We can choose and use an appropriate way according to each purpose from these equivalent realizations in order to understand, prove some formulae, and/or improve, make a code, etc. The notion of quaternions is generalization of complex numbers. Most significant difference is the non-commutativity qq0 6= q0 q, in general. However, quaternions share many nice properties, for example, quaternions form a ring (i.e., addition, multiplication), a vector space (i.e., multiplication by a real number), a field (i.e., every non-zero element has its inverse). 3.6.2 Unit quaternions + c j + dk = a − bi − c j − dk ∈ R + Ri + R j + Rk = H. The The conjugate is defined by a + bi √ absolute 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 θ θ + (sin )u, 2 2 (25) where u is a unit imaginary quaternion. The multiplication p 7→ qpq−1 = qpq gives an action of a unit quaternion q on H. This action preserves the imaginary quaternions Im H = {bi + c j + dk | b, c, d ∈ R}. (26) qpq−1 = (cos θ )p + (sin θ )u × p + (1 − cos θ )(u · p)u, (27) To be more explicit, which is equal to Rodrigues’ formula (14). This is an identity transformation if and only if q = ±1. So, we obtain a surjective group homomorphism H1 → SO(3), which induces an isomorphism ∼ H1 /{±1} → SO(3). (28) (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 : Im H 3 θ θ θ u 7→ cos + (sin )u ∈ H1 . 2 2 2 3 The group H1 is also denoted by Sp(1), the compact symplectic group. 4 Comprehensive treatment of exponential maps will be discussed in the later sections. 14 (30) For given q0 , q1 ∈ H1 , the spherical linear interpolation is given by sin((1 − t)θ ) sin(tθ ) q0 + q1 . sin θ sin θ This expression is explicit and fast, but does not explain why. It is characterized by slerp(q0 , q1 ,t) = slerp(q0 , q1 ,t) = slerp(1, q1 q−1 0 ,t)q0 , slerp(1, exp(θ u),t) = exp(tθ u). (31) (32) (33) The first equality is understood as an invariance under the rigth-translation. The second equality is understood so that the interpolation, t 7→ tθ u is chosen to be a linear interpolation on Im H. We summarize log SO(3) ← H1 −→ Im H ↓ slerp ↓ linear interpolation exp 1 SO(3) ← H ←− Im H. 3.7 Dual quaternion For a set R of numbers, its dual is defined to be R + Rε with the rule ε 2 = 0 and εa = aε for a ∈ 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 quaternions is useful. (i) H + Hε with ε 2 = 0. z w (ii) A subalgebra of M(2, H), consisting matrices of the form . 0 z We define a dual quaternion z + wε to be a unit dual quaternion if |z| = 1 and hz, wi = 0, where h·, ·i denotes the usual inner product. Every unit dual quaternion is a product of a unit quaternion z and a unit dual quaternion of the form 1 + wε with w ∈ Im H. 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 unit quaternion q = z + wε on p = 1 + (xi + y j + zk) by qpq∗ , where q∗ = z − wε. The action of unit quaternion z expresses a rotation in 3D, and the action of unit dual quaternion q = 1 + wε with w ∈ Im H expresses a translation in 3D. See [Kavan08] for detail. The semi-direct structure and the behavior of the exponential map on dual quaternions are understood both in the dual quaternion picture and matrix realization picture, as is the case of quaternions. 4 Non-rigid transformation In this section, we discuss non-rigid transformations, i.e., matrices for deformations. 15 4.1 Several classes of transformations GL is not a graphic library (joke) but a general linear group, consisting of invertible linear transformations on Rn . These are usually expressed in terms of square matrices with non-zero determinants. 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 usually expressed by a pair of an invertible square matrix and a vector in Rn . The matrix shows the linear transformation and the vector does the translation. The set of all affine transformations is written as Aff(n). This group can be also expressed in invertible square matrices of size (n + 1); Aff(n) ⊂ GL(n + 1). A d n Aff(n) := A ∈ GL(n), d ∈ R . (35) 0 1 This realization is called a homogeneous expression. The composition of homogeneous expression is nothing but a multiplication of two matrices. If the determinant of a matrix of GL(n) or Aff(n) is negative, then the corresponding transformation changes the orientation of objects. We denote the set of orientation preserving transformations by GL+ (n) = {A ∈ GL(n) | det(A) > 0}, A d + + n Aff (n) = A ∈ GL (n), d ∈ R . 0 1 Figure 3: Inclusions of Lie groups We here summarize the inclusion relations of these sets of transformations in Figure 3. Here we add some explanations. In each left-right edge, the object on the left is an index two subgroup of the object on the right. The object on the left is ‘connected’ while the object on the right is ‘disconnected’. In each vertical edge, the object on the top is the semi-direct product of the object on the bottom with the translation group Rn . In each front-behind edge, the object on the front is the subset of rigid transformations of the object on the behind. The motion group (or Euclidean motion group), denoted by SE + (n) is a map on Rn preserving the length, angle, and the orientation. Each element of the motion group can be expressed as a pair of a rotation and a translation. The congruence group, denoted by SE(n), is the set 16 of transformations which preserves the shape, but may change the orientation. A reflection is a typical example of congruence transformation. These classes of transformations are ‘groups’: The successive composition of transformations belongs to the same class of transformation, and the 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 these eight classes of groups, SO(n) and O(n) are compact, while other six classes of groups are not compact. The notion of connected and arcwise connected is equivalent in our cases. A maximal connected subset is called a connected component. We cannot continuously interpolate two elements in a different connected components. For example, a flip and the identity cannot interpolate in GL(n). All these eight types of groups are non-commutative for n = 2, 3 except for SO(2). 4.2 Semidirect product We see that the composition of a rotation, a translation, and the inverse rotation is another translation (see, Figure 3). Rα Tβ R−α = TRα (β ) . (36) In general, this fact is related with the notion of ‘normal subgroup’ and ‘semi-direct’ product of subgroups. Let G be a group. The following concepts for G are used to describe the relations among the matrix group appeared in the course notes: (i) A subset H of G is called a subgroup if H is closed under the composition and the inversion, Figure 4: Translations are normal (ii) A subgroup H of G is called a normal subgroup if the composition g ◦ h ◦ g−1 of any h ∈ H and g ∈ G belongs to H. For example, the set R3 of translations is a normal subgroup of SE + (3), while the set SO(3) of rotations centered at the origin is a subgroup of SE + (3) but not normal. 17 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 n K. Note that hkh−1 ∈ K for any h ∈ H and k ∈ K, but is not necessarily equal to k. If both H and K are normal subgroups of G, and hk = kh for all h ∈ H and k ∈ K, and the map (37) is bijective, then G is called a direct product group H × K. Note that hk = kh if and only if hkh−1 = k. Motion groups and affine transformation groups are typical examples of semi-direct product groups: SE + (n) = SO(n) n Rn , SE(n) = O(n) n Rn , (38) (39) Aff+ (n) = GL+ (n) n Rn , Aff(n) = GL(n) n Rn . (40) (41) 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 and scaling, but a rotation part has some ambiguity, depending on the choice of the origin and that of the coordinates. 4.3 Decomposition of the set of matrices Other than (semi-)direct product, several decompositions of matrices are widely used in computer graphics. Here we summarize the decompositions which will appear in the later sections. • Polar decomposition, A = RS, where R is a rotation 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) Figure 5: Polar decomposition (42) is bijective. Note that if we reverse the order SO(n) × Sym+ (n) 3 (R, S) 7→ SR ∈ GL+ (n) 18 (43) then it is still bijective, however gives the different map. We also note that the set Sym+ (n) is not a group; actually, the product of two element in Sym+ (n) is not necessarily symmetric. • Diagonalization of positive definite symmetric matrix: Every positive definite symmetric matrix X is written as X = RDRT = RDR−1 , where R is a rotation matrix in 2D and D is a diagonal matrix whose diagonal entries are all positive. Actually, the diagonal entries of D is the 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 (R0 , D0 ) expresses the same X, then there exists a permutation matrix P such that D0 = PDPT . Here a permutation matrix is, by definition, a matrix which has unique non-zero entry 1 in each row and each column. The inverse and the product of permutation matrices are also permutation matrices. Furthermore, if D has a distinct diagonal entries, then P is unique. This means that the expression X = RDRT is not unique, but the freedom choices exist only in the order of eigenvalues of X in the diagonal entries in D. • Singular value decomposition (SVD): Every matrix A ∈ GL+ (2) can be written as A = Rα DRβ , where Rα , Rβ ∈ SO(2) and D is a diagonal matrix with positive diagonal entries (see Figure 6). In general, the product map SO(n) × Diag+ (n) × SO(n) → GL+ (n) (45) (R0 , D, R) 7→ R0 DR is surjective. This SVD is a combination of the polar decomposition and the diagonalization of positive symmetric matrix. In fact, if we denote by A = R0 S the polar decomposition of A, and by S = RDRT , then the expression A = (R0 R)DR gives SVD. (Notice that R0 R ∈ SO(n).) This enables us to compute SVD by Figure 6: SVD polar decomposition and the iagonalization of positive symmetric matrix. On the other hand, when we have SVD A = R0 DR, then A = (R0 R)(RT DR) gives polar decomposition of A. Similarly, SO(n) × Diag(n) × SO(n) → GL(n) is also surjective. Note that SVD is called Cartan decomposition in mathematical literature. In this point of view, the compactness of SO(n) and commutativity of Diag(n) is significant. 19 5 5.1 Exponential and logarithm of matrices Exponential: definitions and basic properties The exponential of a square matrix A is defined to be ∞ exp(A) = 1 1 1 ∑ n! An = I + A + 2 A2 + 6 A3 + · · · , (46) n=0 where A0 = I is the identity matrix. We’ll refer to (46) as the matrix exponential, for short. This is motivated by Taylor expansion of the usual exponential function ex = ∞ 1 1 1 ∑ n! xn = 1 + x + 2 x2 + 3! x3 + · · · . (47) n=0 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 a e 0 0 a 0 0 exp 0 b 0 = 0 eb 0 , (48) c 0 0 c 0 0 e and a rotation 0 −θ exp θ 0 cos θ − sin θ = . sin θ cos θ (49) In general, the conjugate invariance exp(P−1 AP) = 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 θ + i sin θ = 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 rotation. This feature makes the inverse complicated; the logarithm is multi-valued. The logarithm might be defined to be the inverse of the exponential as is the case of the real scalar-valued function exp : R → {y > 0} = R>0 . (52) However, by the same reason of the logarithm of complex numbers, the logarithm of matrices is not unique. Moreover, the non-commutativity of matrices causes further complications. We will come back this issue in later sections. 20 5.2 Rodrigues’ formula and exponential Every 3D rotation is expressed by Rodrigues’ rotation formula: 0 −x3 x2 sin |x| 1 − cos |x| 2 0 −x1 = I + Rx = exp(A) = exp x3 A+ A , |x| |x|2 −x2 x1 0 q where |x| = x12 + x22 + x33 is the norm of (53) a vector x = (x1 , x2 , x3 ) ∈ R3 . The matrix Rx shows the rotation around the axis through 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 is regarded as ‘Lie algebra’ of SO(3) (see Figure 7, and Section 2 as well). In the course notes, we will not discuss a Lie algebra axiomatically but consider it as a linear approximation of a group (more precisely, the group means a Lie group in this context, or a matrix group, continuous group, in a clasFigure 7: Lie algebra as a tangent space sical terminology). In fact, the exponential map gives a local diffeomorphism(= oneto-one, onto, smooth) between a neighborhood of the origin of the vector space and a neighborhood of the identity of the group (the set of transformations). 5.3 Exponential/logarithm on shears The 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) sym(n) Diag+ (n) diag(n) = = = = {X | symmetric, positive definite}, {A | symmetric}, {X | diagonal matrices with positive diagonal entries}, {A | diagonal matrices} 21 The explicit form of (55) has been given in (48). The relation between (54) and (55) has been suggested in (44): exp(RXRT ) = R exp(X)RT for R ∈ SO(n) and X ∈ diag(n). group Sym (n) no sym(n) no + Diag (n) yes diag(n) no + vector space commutative no no yes yes no yes yes yes The role of linearity (vector space) and of commutativity is discussed in section 5.7. Both Sym+ (n) and Diag+ (n) are convex open subsets of vector spaces. 5.4 Exponential/logarithm on 3D rotation The exponential map gives a surjection(= onto map): exp : so(3) = {A | skew-symmetric} → {X | rotation} = SO(3). 5.5 (56) Exponential map on square matrices The exponential map exp : {square matrices} → GL(n) exp : {A | trace(A) = 0} → {X | det(X) = 1} = SL(n) (57) (58) are neither surjective nor injective. Note that the polar decomposition can be considered as a non-linear and non-commutative counter part of a linear and commutative natural decomposition, in the level of vector spaces, into symmetric and skew-symmetric matrices. 5.6 Loss of continuity The axis of rotation is a natural invariant of 3D rotation. It is not continuous at the origin of SO(3). This fact has relation with the failure of the local diffeomorphic property of the exponential function. We will explain with some notations: Let B = {x ∈ R3 | |x| ≤ π}. Then the exponential map restricted to B gives a surjective map exp : B → SO(3). (59) exp : {x ∈ R3 | |x| < π} → {R ∈ SO(3) | det(R + I) 6= 0}. (60) It is diffeomorphic on the interior 22 Figure 8: The exponential map of SO(3) 23 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): the map 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 exist uniquely). 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): ∼ 2:1 {x ∈ R3 | 2(n − 1)π < |x| < 2nπ} → {q ∈ H1 | q 6= ±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-wrapping operation), we obtain H1 from tube-like body {x ∈ R3 | 2(n − 1)π ≤ |x| ≤ 2nπ}. The second map collects the isomorphic H1 ’s for n = 1, 2, . . . into one piece. The left and right most points in the third stage are 1 and −1 in H1 , which were the joint points on the second stage. The third map is the map (28). We also understand this phenomena by the following animation: consider the rotation around 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 motion. After the first rotation, the transformation (matrix) ‘remember’ the axis of rotation, so that the sudden change of the rotation axis from x-axis to y-axis is considered to be a discontinuous move. We can prove that if the move is C1 (continuously differentiable, that is, the velocity is continuous), then the logarithmic lift exists even the transformation go through the identity. 24 5.7 The field of blending A vector space is, by definition, closed under the interpolation (1 − t) × p + t × q and the blend w1 p1 + w2 p2 + · · · + wk pk . In a curved space (such as a group), the interpolation and the blend may not belong to the space again. The space where we blend or interpolate something should be a linear space or a convex subset of it (see Figure 9). In this sense, the set of rotation matrices is not appropriate, so that it will be replaced by the set of skew symmetric matrices. The set of positive definite symmetric matrices is an open convex subset of the set of symmetric matrices. It sounds not bad for blending, but still the set of symmetric matrices will be better. Figure 9: Blend in a convex set This is why we once move from one curved space to the other by the exponential function (see Figure 10). We also remark that the addition + in the expression w1 p1 + w2 p2 + · · · + wk pk is a commutative operation: a + b = b + a. If the space loses this commutativity, then the interpolation and the blend may not be straight forward. The linearity and commutativity are therefore the key to the interpolation and blending. Note that an interpolation can be considered as a special case of blending; a blend of two things, and weights is in between 0 and 1. So the non-commutativity is relaxed for interpolation, but non-linearity still exists. Figure 10: Interpolation by linearization 25 Applications 6 6.1 2D Affine transformation between two triangles Triangles and an affine transformation As a simple case, this section deals with interpolating the two affine transformations. We note that interpolating affine transformation itself may have other interesting applications; see, for example, [Shoemake94b] and [Alexa02]. First of all, recall that there is a unique affine transformation that maps a given triangle to another one. Specifically, suppose that we are given three points (x1 , y1 )T , (x2 , y2 )T , Figure 11: Interpolation of triangles and (x3 , y3 )T ∈ R2 forming a triangle, then there is a unique affine transformation x1 − x3 x2 − x3 x3 x1 x2 x3 1 0 0 y1 − y3 y2 − y3 y3 = y1 y2 y3 0 1 0 0 0 1 1 1 1 −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. In other words, the set of three points forming a triangle is a principal homogeneous space of the affine 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 (x10 , y01 )T , (x20 , y02 )T , and (x30 , y03 )T ∈ R2 in this order. Then the following 3 × 3-matrix 0 0 0 −1 x1 x2 x3 x1 x2 x3  = y01 y02 y03 y1 y2 y3 (67) 1 1 1 1 1 1 a1,1 a2,1 dx is of the form a1,2 a2,2 dy , and represents the requested affine transformation. We de0 0 1 note the group of the two-dimensional affine transformations by Aff(2), which are represented by 3 × 3-matrices of the above form. Note that all the entries ai j , dx and dy are linear in entries of x0j ’s. This observation is important in global optimization (see section 7.2). We call a1,1 a2,1 A= as the linear part and d = (dx , dy )T as the translation part of  and consider a1,2 a2,2 27 them separately for interpolation. Interpolating the translation part can be neglected (see the discussion in section 7.2). We focus on interpolation of linear transformation here. In general we may assume that transformation is orientation preserving, that is, it does not “flip” 2D shapes. 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 identity 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 log S), see [Kaji12]. A homotopy of a linear transformation A ∈ GL+ (2) is a series of matrices A(t) parametrized by time t ∈ R such that A(0) = I and A(1) = A, where I is the identity matrix. These three AL (t), AP (t), and AE (t) satisfy these properties. 28 The first one AL gives a linear interpolation in the space of all square matrices M(n). This means 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, and then 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 example in a Lie group through linear interpolation in its Lie algebra.) As for symmetric factors S, two interpolations 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 + tS and SE (t) = exp(t log(S)) = St . The difference between these two methods is illustrated in Figures 12 and 13. The method AE (t) uses both the polar decomposition and the exponential map, and it can be seen as a combination of the ideas in [Alexa02] and [Shoemake94b]. 7 Global 2D shape interpolation Rather than a simple triangle case in the previou section, we deal with more general 2D shape interpolation techniques, where we are given two input shapes: source and target. We then assume that each shape may be compatibly triangulated5 . This means that we assume that each shape is triangulated, and that one-to-one correspondence is established between the triangles of the source and target shapes. There are many approaches, including those mentioned earlier, for 2D shape interpolation under the above assumptions. A typical scenario of these approaches came from the seminal work of [Alexa00]: We first define a homotopy of affine maps for each pair of the corresponding triangles of the source and target objects, such that it connects the identity map and the local affine map that gives a bijection between the corresponding triangles. Let us call this homotopy local. Next we construct the homotopy that gives global interpolation between the source and target. This homotopy is defined as a family of the piecewise affine maps, each of which is derived from the affine maps of the local homotopy through a certain energy minimization process. This scenario works well and has inspired many research works. However, from a practicality viewpoint, there remain many things to be improved and polished. For example, the following practical aspects of the methods should be addressed: (a) controllability - how to add constraints to get a better result?; (b) rotation consistency -how to treat large rotations (> 180 5 In general, when the two shapes are given without boundary matching nor compatible triangulation, we would need a preprocess to establish them. As for this issue, [Baxter09] is a good reference describing the most relevant techniques along with their own approach. 29 degrees)?; and (c) symmetry - Can we make it possible that the vertex paths for interpolation from shape A to shape B are the same as from B to A? Recently [Baxter08] gave a formulation of rigid shape interpolation using normal equations, presenting the algorithms that meet these requirements. This section presents a mathematical framework for the above homotopic approaches using affine maps. We start with analyzing the local affine map directly, and introduce a new local homotopy 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 discussed how the algorithms meet the above practical requirements. We demonstrate that our mathematical framework gives a comprehensive understanding of rigid interpolation/deformation approaches. In particular we illustrate the power of this framework with the animation examples obtained by several different constraint functions. 7.1 Formulation We now describe the source and target shapes which are compatibly triangulated more explicitly. 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 summarized as follows: • (from triangle to affine transformation) For each pair of the source and the target triangles corresponding to τi , we initially get the affine map, denoted by Âi , that maps the initial triangle to the target triangle, where Âi ∈ Aff(2) is a 3 × 3-matrix. • (local interpolation of linear part) We then construct a homotopy between the 2 × 2 identity matrix and the linear part Ai of Âi (i.e., from I2 ∈ GL+ (2) to Ai ∈ GL+ (2)). The homotopy is parameterized by t, with 0 ≤ t ≤ 1. The collection {Âi | i = 1, 2, . . . , m} of affine maps Âi ’s can be considered as a piecewise affine transformation from P to Q (see its precise definition in section 7.2). • (global interpolation via error function) We next construct a global homotopy between the inclusion map P ,→ R2 and the piecewise affine transformation from P to Q, which will be denoted by {B̂i (t) ∈ Aff(2) | i = 1, 2, . . . , m} with t ∈ R in section 7.2. It is obtained by minimizing a global error function regarding the linear part Bi (of B̂i ) and Ai along with the user-specified constraint function. We have been explained the first and the second procedure. We now explain the final procedure. 30 7.2 Error function for global interpolation To achieve global interpolation between the two shapes, we have to assemble local translations considered in the previous section. In our context, this means that we represent a global transformation as a piecewise affine transformation. More precisely, we consider a collection of affine maps B(t) := {B̂i (t) ∈ Aff(2) | i = 1, 2, . . . , m}, (0 ≤ t ≤ 1) such that B̂i (t)’s are consistent on the edges. More precisely, B̂i (t)pk = B̂ j (t)pk for all t whenever k ∈ τi ∩ τ j . We put B(t)pk = B̂i (t)pk for k ∈ τi . Let vk (t) := B(t)pk , (1 ≤ k ≤ n) be the image of the initial vertices P. The following observation is vital in this section. The piecewise affine transformation B(t) which maps pk ’s to vk (t)’s is uniquely determined by (67) and its entries are linear with respect to vk (t)’s. Therefore, giving B(t) and giving vk (t)’s are equivalent and we identify them and interchange freely in the following argument. See also Section 6. We also 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 B̂i (t) and Ai (t) is the local homotopy 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. For a moment we consider a fixed t. We then introduce two more ingredients other than local homotopy data; • a set of local error functions Ei : M(2, R) × GL+ (2, R) → R≥0 , (1 ≤ i ≤ m). • a constraint function C : (R2 )n → R≥0 . The local error function Ei is positive definite and quadratic with respect to the entries of the first factor M(2, R). Intuitively, it measures how different the given two local transformations are. 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 we will describe later. If we are given local error functions for each triangle τi , (1 ≤ i ≤ m) and a constraint function, we combine them into a single global error function m Et (B) := ∑ Ei (Bi (t), Ai (t)) +C(v1 (t), . . . , vn (t)), i=1 31 where we regard B(t) (or more precisely, the entries of Bi (t) which are linear combinations of vk (t)’s) as indeterminants to be solved. For each t, the minimizer of Et may have positive dimension in general, however, one can modify the constraint function C such that it becomes a single point, as we see by concrete examples later. The single minimizer B(t) is the piecewise affine map that we take as a global interpolation method. Efficiency of finding the minimizer: We show that finding the minimizer of a global error function is efficient enough. Since the global error function is a positive definite quadratic form, 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 that v(t) = − 21 G−1 u(t) is the minimizer. Note that G is time-independent and we need to compute G−1 just once for all frames (see [Alexa00]). 7.3 Examples of local error functions In the above point of view, we have a flexibility to choose error functions. For example, we can take EiP (Bi (t); Ai (t)) := ∑ ||Bi(t)pk − Ai(t)pk ||2. (68) k∈τi EiF (Bi (t), Ai (t)) := ||Bi (t) − Ai (t)||2F , EiS (Bi (t), Ai (t)) := min (69) ∑ kBi(t)pk − sRδ Ai(t)pk k2 , (70) s,δ ∈R k∈τ i EiR (Bi (t), Ai (t)) := min kBi (t) − sRδ Ai (t)k2F . (71) s,δ ,∈R where the Frobenius norm of a matrix M = (mi j ) is defined to be kMk2F = ∑ m2i j . We now i, j EP compare these error functions. The error function measure how the intermediate vertices vk (t)’s are different from those obtained by applying the local transformations to the initial vertices. However, this intuitive approach does not produce a good result. We have to speculate on how to define a good error function. The error function E F is used in [Alexa00]. It measures how the local transformation and the final global transformation differ as linear maps. The resulting global error function is invariant under translation and hence requires two dimensional constraints to get a unique minimizer. For example, [Alexa00] proposes the following constraint function: C(v1 (t), . . . , vn (t)) = ||(1 − t)p1 + tq1 − v1 (t)||2 . 32 Figure 14: An example of global interpolation obtained by EiF 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 EiF . To obtain smooth interpolation between the leftmost and rightmost figures, local transformations should deal with rotation angles larger than π, but EiF fails to make it. It produces a fairly satisfactory global transformation when the constraint function is very simple and rotation is “homogeneous.” However, this method fails if (a) we want to put some constraints (see Figure 14), or (b) the expected rotation angles vary beyond 2π from triangles to 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 similarity transformation, i.e., rotation and scale. [Werman95] has proposed an error function E S , which is 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 a constraint function which forces the vertex loci to be on the specified curves. We will see the detailed construction later. For the purpose of finding a best matching global transformation with given local transformations, it is better to use a metric in the space of transformations, rather than in the space of points. The error function E R , which is a slight modification of E S , measures how different 33 Figure 16: An example of global interpolation obtained by EiR 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 EiR with the same input data as Figure 15. The proper rotation angles for the local triangles are automatically chosen by minimizing the global error function. Ai (t) and Bi (t) are as linear maps up to rotation and scale. The above function E R has a closed form B · AT 2 + 2 det B · AT F . (72) min ksRδ A − Bk2F = kBk2F − s,δ ∈R kAk2F This is positive definite quadratic with respect to the entries of B. Since it is invariant under similarity transformation, it avoids the flaws of EiF in the cases of (a) and (b); Compare Figure 16 with Figure 14, and Figure 17 with Figure 15, respectively. We note that a positive linear combination of positive definite quadratic function is also a positive definite quadratic function. This means that a linear combination of above mentioned error functions is also an error function. This idea can be used for practical improvement. We give 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 of triangle is, more important its rigidity becomes. Hence, it is reasonable to weight by the areas 34 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 EiR in (71) is employed for a general use. However, we may not want some parts of the 2D shape to rotate or to scale (such as a face of a character). In such cases, we can use a balanced local error function wi EiF (t) + (1 − wi )EiR (t), where wi ∈ [0, 1]. If we put a large wi , the rotation and scale of the triangle τi would be suppressed. We thus believe that our framework provides more user controllability over previous approaches. (iii) As is shown in [Baxter08], we can symmetrize the interpolation by symmetrizing the error function. Let Ei (t) be a global error function for a local homotopies Ai (t), and Ei−1 (t) be that for A−1 i (t). Then define a new error function by Ei0 (t) := Ei (t) + Ei−1 (1 − t). This is symmetric in the sense that it is invariant under the substitution Ai ← A−1 i and t ← 1 − t. That means that the same minimizing solution is given if we swap the initial and the terminal polygons and reversing time. 7.4 Examples of constraint functions Now we give a concise list of the constraints we can incorporate into a constraint function C(v1 (t), . . . , vn (t)). See the demonstration video in [Kaji12]. • Some points must trace specified loci (for example, given by B-spline curves). This is realized 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. This gives a simple way to control the global rotation. • The barycenter must trace a specified locus uo (t). This is realized by adding the term co || n1 ∑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 8 Parameterizing 3D Positive Affine Transformations Next 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, quaternion or Euler angle parameterizes rotations, and dual quaternion with axis-angle presentation parameterizes the rigid transformation [Kavan08]. These parameterizations are partial: they deal only with subsets of Aff+ (3), and cannot shear and scale. [Alexa02] tried to give a Euclidean parameterization 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 is limited for the translations without negative eigenvectors, while the Lie correspondence only garantees 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 the whole transformations, giving geometrically meaningful runtime operations. 8.1 The parameterization map and its inverse Let M(3, R) be the set of 3 × 3-matrices, as usual. We set the 12-dimensional parameter space se(3) × sym(3), where X̂ lX T 3 se(3) := X = | X̂ = −X̂ ∈ M(3, R), lX ∈ R 0 0 is the Lie algebra for the 3-dimensional rigid transformation group SE(3) and sym(3) is the set of 3 × 3-symmetric matrices (see section 5.3). Now we define the parametrization map φ: se(3) × sym(3) → Aff(3) X ×Y 7→ exp(X)ι(exp(Y )), (73) where exp is the matrix exponential defined by (46) in section 5.1 and ι : M(3, R) → M(4, R) is given by B 0 ι(B) = . 0 1 This gives a mathematically well-defined parametrization, since it is surjective and has a continuous inverse as we see below. However, computation by the infinite series of the matrix exponential (46) is very slow, and hence, we need to develop an efficient algorithm for our applications. In the next section, we will discuss the fast and explicit formula for the computation. 36 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) p p A 7→ log(A ι( ÂT Â)−1 ) × log( ÂT Â). (74) Note that ÂT  is symmetric positive definite so that the square root is uniquely determined and the logarithm is also √well-defined (it is calculated by [Denman76] and [Cheng01], for example). Note also that A ι( ÂT Â)−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 algorithm First, we consider how to compute (74). Note that ÂT  is a positive definite symmetric matrix so that it is diagonalized as λ1 0 0 P 0 λ 2 0 PT 0 0 λ3 with some orthogonal matrix P and λi > 0. Then we can compute √ log( λ1 ) 0 0 p √ PT . 0 log( λ2 ) 0 log( ÂT Â) = P p 0 0 log( λ3 ) √ R̂ dR −1 T Let R = A ι(  Â) . Since R ∈ SE(3), we can write R = . By mimicking the 0 1 famous Rodrigues’ formula [Brockett84] for the rotation matrices, we have X̂ lX log(R) = , 0 0 θ Tr(R) − 1 where X̂ = (R − RT ), θ = cos−1 , and 2 sin θ 2 2 sin θ − (1 + cos θ )θ 2 1 X̂ dR . lX = I3 − X̂ + 2 2θ 2 sin θ Here we have indeterminacy of cos−1 up to modulo 2π. However, if we impose continuity, we can take one explicit choice. (An explicit code will be given in [Kaji].) 37 Next, we consider how to compute (73). For any symmetric matrix Y ∈ sym(3), any matrix function can be computed using diagonalization. However, we introduce a faster algorithm to compute 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 characteristic polynomial of Y : Tr(Y )2 − ||Y ||2F λ 3 − Tr(Y )λ 2 + λ − det(Y ), (75) 2 where ||Y ||F is the Frobenius norm of Y . Note that computing eigenvalues is much faster than computing diagonalization. We therefore can compute the exponential of Y as a degree two polynomial 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 t u a b c = = = = = = exp(λ1 )/(λ1 − λ2 )(λ1 − λ3 ), exp(λ2 )/(λ2 − λ3 )(λ1 − λ2 ), exp(λ3 )/(λ2 − λ3 )(λ3 − λ1 ), sλ2 λ3 − tλ3 λ1 − uλ1 λ2 , −s(λ2 + λ3 ) + t(λ3 + λ1 ) + u(λ1 + λ2 ), s + t + u. Then we have exp(Y ) = aI3 + bY + cY 2 . X̂ lX Finally, for X = ∈ se(3), again by mimicking Rodrigues’ formula, we have 0 0 R̂ d exp(X) = , 0 1 where 1 − cos θ 2 sin θ X̂ + X̂ , θ θ2 1 − cos θ θ − sin θ 2 d = I3 + R̂ + R̂ lX . θ2 θ3 R̂ = I3 + and 38 (76) 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 applications Next 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 V is 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: m V 3 v 7→ ∑ φ (wi ψ(Ai ))v, (77) i=1 where we think of the vertex positions v ∈ R3 as column vectors and the matrices multiply from the left. When we take V as the set of simplex, the above formula gives non-consistent map on the edges, and we need to patch them by certain energy minimizing technique such as ARAP[Alexa00]. Among the good properties of our parametrization is that ∑m i=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 carry transform data. For example, see Figure18, where the red icons means the probes. If the 39 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 in Figure 18. More precisely, each probe detects the affine map Ai ∈ Aff(3) which transforms it to the current position from the initial position. 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 distance between v and the probe location. Figure 19 shows another example for designing 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 any triangulated polyhedron wrapping the target shape. We want to deform the target shape by manipulating not directly on it but through proxy cage (see [Ju05]). Our parametrization can be used in this framework. A tetrahedra is associated with each face triangle by adding its normal vector. Then each face detects the affine map Ai ∈ Aff(3) which transforms the initial tetrahedra to 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 distance between v and the center of the face. For automatic weight computation, it is better to set wi = 0 when 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) the deformed result by user’s manipulations on the cage. 40 9 Crowd control and orthogonal transformations Animating crowds or flock has been a long challenge in computer graphics since the seminal work by Craig Reynolds [Reynolds87]. In this section, we show a recent progress on crowd modeling by Shigeo Takahashi and his colleauges[Takahashi09], which presents a group formation method for a set of individual characters, such as a marching band formation shown in Figure21. Figure 21: A marching band formation in [Takahashi09] The key idea in this method is to describe dynamic group formation as rotation interpolation of the eigenbases for the Laplacian matrices, which describes how the individuals are clustered in a given keyframe formation (see Figure22). As explained next, the key idea will be clearly described 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 be expressed as a matrix in M(2, n, R), which we denote the set of 2 × n matrices with entries in R. 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 problem to interpolate the source formation XS and the target formation XT , respecting the formation structure. The proposal method in the mentioned paper [Takahashi09] is the following: Let LS 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 DS and DT such that LS = SDS ST and LT = T DT T T , respectively. Here the diagonal entries, which are the eigenvalues of S and T , are arranged in the increasing order. Let R = T S−1 ∈ SO(n). We put M(t) = Rt S, 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 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 = XS S−1 , and ZT = XT T −1 , then From ZS and ZT in M(2, n, R), we define an interpolation 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 = rSk eiθSk , zT k = rT k eiθ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 be identified with M(1, n, C) = Cn . The interpolation is done in entry-wise in C ⊃ C× and by a linear interpolation in polar coordinates C× ∼ = R>0 × R. Note that C× = GL(1, C) and the polar z decomposition of GL(1, C) is z = |z| × |z|, that is, the multiplication map {eiθ | θ ∈ R} × {r ∈ R | r > 0} → GL(1, C) is bijective. 42 (79) There are freedom of choice, the eigenvalue reordering, the signature of eigenvectors, and orientation preserving, which are discussed in the paper. We can regard this procedure also by the matrix factorizations and the cotrol the ambiguity of logarithm of matrices in a uniform manner. Using the interpolation M(t) of frames and the interpolation Z(t) of Figure 23: Linear and polar interpolation in coefficients, we obtain an interpola[Takahashi09] tion X(t) = Z(t)M(t) of group formations, which satisfies X(0) = ZS S = 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 a method of motion description in a fixed coordinate system. 10 Further readings Motion description with diffeomorphisms How do we describe motion/deformation of objects in Rn ? We have shown the following examples: • 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 us a natural and wider framework of Lie group approaches. We then note that the set of all diffeomorphisms for a given surface (or manifold) constitutes an infinite-dimensional Lie group, where the multiplication is defined as composite of the diffeomorphisms. Unfortuantely an infinite-dimensional Lie group is still difficult to understand with the current mathematics, although many attempts have been done. For example, [Mumford10] gives a good introduction to this general framework, focusing on morphing between two 2D images as input. map linear piecewise linear diffeomorphism transformation (Lie) group local single global finitely many global infinite-dimensional 43 Lie group applications Quaternion is a useful tool for controlling rotation. This also suggests that quaternion is powerful in camera control. [Shoemake94a] proposed a solution of the camera twist problem using quaternions, where H1 is treated as a fiber bundle, which means that H1 is locally homeomorphic 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 system providing trade-off between physical-simulation and kinematics control using a metric interpolation and real-time animation. The latter one uses PGA, as described next. Principal geodesic analysis (PGA [Fletcher04]) provides a new statistical shape analysis method 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 notion capture sequence in computer animation [Tournier12]. As is well known, Principal Component Analysis (PCA) is a standard technique for dimension reduction of statistical data lying on a Enclidian space. PGA is a generalization of this technique for curved data manifold. In PGA the concept of Lie group plays a fundamental role and it acts on the data manifold as a symmetric Riemaninan manifold. Finally, for a more mathematical aspect of Lie groups and Lie algebras, we would like to refer to the classical literatures: [Helgason78] and [Knapp96]. Though those are a bit far from graphics 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 Acknowledgements This 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 their valuable discussions. The authors also wish to thank A. Kimura, G. Liu and Y. Kurihara for their 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 and rendering, 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 Information Sciences58, 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 and Visualization (CGIV2010), 41–48, IEEE, 2010. [Cheng01] S. H. Cheng, N. J. Higham, C. S. Kenney and A. J. Laub, Approximating the Logarithm 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 Computations in Systems, Appl. Math. Comput. 2(1), 63–94, 1976. [Duistermaat1999] J. J. Duistermaat and J. A. C. Kolk, Lie Groups, Springer, Universitext, 1999. 45 [Ebbinghaus91] H.-D. Ebbinghaus, H. Hermes, F. Hirzebruch, M. Koecher, K. Mainzer, J. Neukirch, A. Prestel and R. Remmert, Numbers, Graduate Texts in Mathematics, Springer 1991. [Fletcher04] P. T. Fletcher, C.Lu, S.M. Pizer and S. Joshi, Principal geodesic analysis for the study 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, Academic Press, 1978, reprinted by the American Mathematical Society, 2001. [Igarashi05] T. Igarashi, T. Moscivich, and J. F. Hughes, As-rigid-as-possible shape manipulation. ACM Trans. Graph. 24(3), 1134–1141, 2005. [Igarashi09] T. Igarashi and Y. Igarashi, Implementing as-rigid-aspossible shape manipulation and 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 on affine 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 affine transformations, Proc.MEIS2013, Symposium: Mathematical Progress in Expressive Image 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 Transformation, in preparation. [Kavan08] L. Kavan, S. Collins, J. Zara, and C. O’Sullivan, Geometric skinning with approximate 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 animation and control of vehicles, ACM Trans. Graph. 28, Article 16, 2009. [Lewis00] J. P. Lewis, M. Cordner and N. Fong, Pose space deformation: A unified approach to shape interpolation and skeleton-driven deformation, In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, SIGGRAPH 2000, 165– 172, 2000. 46 [Moler03] C. Moler and C. van Loan, Nineteen Dubious Ways to Compute the Exponential of a 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: Deformation Models, M. G. Hidalgo, A. M. Torres and Javier Varona Gómez (eds.) Lecture Notes in Computational 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 the 12th annual conference on Computer graphics and interactive techniques, ACM Press, 245–254, 1985. [Shoemake94a] K. Shoemake, Fiber Bundle Twist Reduction, In Graphics Gems IV Academic Press, 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, Spectralbased 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 Wesley, 1992. [Werman95] M. Werman and D. Weishall, Similarity and affine invariant distances between 2d point 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 the 2005 ACM symposium on Solid and physical modeling, SPM ’05, ACM Press, 267–274, 2005. 47