Feature Tutorial Geometric Algebra: A Computational Framework For Geometrical Stephen Mann Applications University of Waterloo Leo Dorst Part 2 University of Amsterdam his is the second of a two-part tutorial on defines a rotation/dilation operator. Let us do a slight- Tgeometric algebra. In part one,1 we intro- ly simpler problem. In Figure 1a, if a and b have the duced blades, a computational algebraic representa- same norm, what is the vector x in the (a ∧ b) plane that tion of oriented subspaces, which are the basic elements is to c as the vector b is to a? Geometric algebra phras- of computation in geometric algebra. We also looked es this as xc–1 = ba–1 and solves it (see Equation 13 at the geometric product and two products derived from part one1) as from it, the inner and outer products. A crucial feature of the geometric product is that it is invertible. − 1 xbac= ( 1) =⋅+∧(ba b a) c From that first article, you should 2 have gathered that every vector a This second part of our space with an inner product has a b − φ geometric algebra, whether or not =−(cosφφIc sin ) = e I c (1) tutorial uses geometric you choose to use it. This article a shows how to call on this structure algebra to represent to define common geometrical con- Here Iφ is the angle in the I plane from a to b, so –Iφ is structs, ensuring a consistent com- the angle from b to a. Figure 1a suggests that we obtain rotations, intersections, and putational framework. The goal is to x from c by a rotation, so we should apparently inter- show you that this can be done and pret premultiplying by e–Iφ as a rotation operator in the differentiation. We show that it is compact, directly computa- I plane. tional, and transcends the dimen- The vector c in the I plane anticommutes with I: cI= how a small set of products sionality of subspaces. We will not –Ic—showing that I is not merely a complex number, use geometric algebra to develop even though I2 = –1. Using this to switch I and c in Equa- simplifies many geometrical new algorithms for graphics, but we tion 1, we obtain that the rotation is alternatively repre- hope to convince you that you can sentable as a postmultiplication: operations. automatically take care some of the lower level algorithmic aspects, − φ e I c =−cIccosφφ sin without tricks, exceptions, or hidden degenerate cases =+φφ =Iφ by using geometric algebra as a language. ccIcos sin ce (2) Rotations What is cI? First, temporarily introduce orthonormal Geometric algebra handles rotations of general sub- coordinates {e1, e2} in the I plane, with e1 along c, so m spaces in V through an interesting sandwiching prod- that c ≡ ce1. Then, I = e1 ∧ e2 = e1 e2. Therefore, cI = uct using geometric products. We introduce this ce1e1e2= ce2—it is c turned over a right angle, following construction gradually. the orientation of the 2-blade I (here anticlockwise). So c cosφ + cI sinφ is “a bit of c plus a bit of its anticlock- Rotations in 2D wise perpendicular,” and those amounts are precisely In the last article, we saw that the ratio of vectors right to make it equal to the rotation by φ (see Figure 1b). 58 July/August 2002 0272-1716/02/$17.00 © 2002 IEEE Angles as geometrical objects I-plane x c I I-plane In Equation 1, the combination Iφ is a full indication 1 (a) The rota- − φ φ of the angle between the two vectors. It denotes not only c Rc = e I c = ceI tion operator as the magnitude but also the plane in which the angle is a ratio between measured and even the angle’s orientation. If you ask vectors. (b) c for the scalar magnitude of Iφ in the plane –I (the plane Coordinate-free b from b to a rather than from a to b), it is –φ. Therefore, specification of the scalar value of the angle automatically gets the right a (a) (b) rotation. sign. The fact that the angle as expressed by Iφ is now a geometrical quantity independent of the convention used in its definition removes a major headache from many geometrical computations involving angles. We over π/2, we write out their rotors (using the shorthand call this true geometric quantity the bivector angle. (It is e23 = e2 ∧ e3 = e2 e3 and so on): just a 2-blade, of course, and not a new kind of element, but we use it as an angle, hence the name). − −Ie31π/4 1 e23 Re1 == Rotations in m dimensions 2 Equation 2 rotates only within the plane I. Generally, we would like to have rotations in space. For a vector x, and the outcome of a rotation RIφ should be − −Ie32π/4 1 e31 Re2 == RIφ x = x⊥ + RIφ x|| 2 where x⊥ and x|| are the perpendicular and parallel com- The total rotor is their product, and we rewrite it back to ponents of x relative to the rotation plane I, respective- the exponential form to find the axis: ly. We have seen that we can separate a vector into such components by commutation (as in Equations 31 and 32 ≡=−1 − RRR2 1(11ee 31)( 23 ) from part one1). As you can verify, the following formu- 2 la effects this separation and rotation simultaneously: 1 =−−+(1 eee) 2 23 31 12 –Iφ/2 Iφ/2 rotation over Iφ: x a RIφx = e x e (3) +− =−1 1 eee123 3 I3 φ 2 2 The operator e–I /2, used in this way, is called a rotor. 3 − π In the 2D rotation we treated before, xI= –Ix, and ≡ e Ia3 /3 moving either rotor to the other side of x retrieves Equa- tion 2 if x is in the I plane. Therefore, the total rotation is over the axis a=(e1+ Two successive rotations R1 and R2 are equivalent to e2 – e3)/√3, over the angle 2π/3. a single new rotation R of which the rotor R is the geo- Geometric algebra permits straightforward general- metric product of the rotors R2 and R1, since ization to the rotation of higher dimensional subspaces. We can apply a rotor immediately to an arbitrary blade o = −−1 1 (RR21)xxRR 211( R) R2 through the formula −1 = (RR) xx ( RR) = R R−1 general rotation: X a R X R–1 21 21 This lets you rotate a plane in one operation, for instance, with R = R2R1. Therefore, the combination of rotations using a rotation by R (as in the example we just saw): is a simple consequence of the application of the geo- metric product on rotors—that is, elements of the form − –Iφ/2 2 ∧ 1 = e = cos (φ/2) – I sin (φ/2), with I = –1. This is true RR(ee12) in any dimension greater than 1 (and even in dimension 1 −−+ ++− =− 1, if you realize that any bivector there is zero, so that (11eeee23 31 12) 12( eee 23 31 12) e 31 4 rotations do not exist). Let us see how it works in 3-space. In three dimensions, we are used to specifying rotations by a rotation axis a There is no need to decompose the plane into its span- rather than by a rotation plane I. Given a unit vector a for ning vectors first. an axis, we find the plane as the 2-blade complementary to it in the 3D space with volume element I3: I = Quaternions based on bivectors a I3 = aI3 = I3a. A rotation over an angle φ around an You might have recognized the last example as strong- axis with unit vector a is therefore represented by the ly similar to quaternion computations. Quaternions are φ/2 rotor e–I3a . indeed part of geometric algebra in the following For example, to compose a rotation R1 around the e1 straightforward manner. 3 axis of π/2 with a subsequent rotation R2 over the e2 axis Choose an orthonormal basis {ei}i=1. Construct out IEEE Computer Graphics and Applications 59 Feature Tutorial b ≡ B* Note that this is grade preserving—a k-blade transforms a I3 a ^ B a to a k-blade. We supplement this by stating what the extension does to scalars, which is simply f(α) = α. Geo- b × aa B metrically, this means that a linear transformation leaves the origin intact. Linear transformations are outermorphisms, which explains why we can generalize so many operations BBfrom vectors to general subspaces in a straightforward manner. (a) (b) Dual representation 2 (a) The dual B* of a bivector B and the cross product with a. (b) The Linear algebra often uses dual representations of same result using the inner product of blades (from part one1). hyperplanes to extend the scope of vector-based opera- tions. In geometric algebra, dualization is also impor- tant and in fact is a flexible tool to convert between of that a bivector basis {e12, e23, e31}. Note that these viewpoints of spanning and perpendicularity, for arbi- 2 2 2 elements satisfy e12=e23=e31=−1, e12 e23 = e31 (and trary subspaces. m cyclic), and also e12 e23 e31 = 1. In fact, setting i ≡ e23, Consider an m-dimensional space V and a blade A 2 2 2 m j ≡ –e31, and k ≡ e12, we find i = j = k = i j k = –1 and in it. The dual of the blade A in V is its complement, j i = k and cyclic.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-