Course notes Geometric Algebra for Computer Graphics, SIGGRAPH 2019
CCourse notesGeometric Algebra for Computer Graphics ∗ SIGGRAPH 2019
Charles G. Gunn, Ph. D. † ∗ Permission to make digital or hard copies of part or all of this work for personal or classroomuse is granted without fee provided that copies are not made or distributed for profit or commercialadvantage and that copies bear this notice and the full citation on the first page. Copyrightsfor third-party components of this work must be honored. For all other uses, contact theOwner/Author. Copyright is held by the owner/author(s).SIGGRAPH ’19 Courses, July 28 - August 01, 2019, Los Angeles, CA, USAACM 978-1-4503-6307-5/19/07.10.1145/3305366.3328099 † Author’s address: Raum+Gegenraum, Brieselanger Weg 1, 14612 Falkensee, Germany, Email:[email protected] a r X i v : . [ c s . G R ] A ug ontents Example 1 : Working with lines and points in 3D . . . . . . . . . 74.3
Example 2 : A 3D Kaleidoscope . . . . . . . . . . . . . . . . . . . 84.4
Example 3 : A continuous 3D screw motion . . . . . . . . . . . . . 9 E n . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.6 The tensor algebra of a vector space . . . . . . . . . . . . . . . . . 135.7 Exterior algebra of a vector space . . . . . . . . . . . . . . . . . . . 145.8 The dual exterior algebra . . . . . . . . . . . . . . . . . . . . . . . 155.9 Projective space of a vector space . . . . . . . . . . . . . . . . . . . 155.10 Projective exterior algebras . . . . . . . . . . . . . . . . . . . . . . 175.10.1 Dimensions of projective subspaces . . . . . . . . . . . . . . 185.10.2 Poincar´e duality . . . . . . . . . . . . . . . . . . . . . . . . 195.10.3 The regressive product . . . . . . . . . . . . . . . . . . . . . 20 P ( R , , ) . . . . . . . . . . . . . 236.4 Determining the signature for euclidean geometry . . . . . . . . . . 242 PGA for the euclidean plane: P ( R ∗ , , ) k -vectors . . . . . . . . . . . . . . . . . . . . . . . . . 277.1.1 The ideal norm . . . . . . . . . . . . . . . . . . . . . . . . . 287.1.2 Ideal norm via Poincar´e duality . . . . . . . . . . . . . . . . 297.2 Examples: Products of pairs of elements in 2D . . . . . . . . . . . 307.3 Formula factories through associativity . . . . . . . . . . . . . . . . 327.4 Representing isometries as sandwiches . . . . . . . . . . . . . . . . 35 ( R ∗ , , ) P ( R ∗ , , ) . . . . . . . . . . . . . . . . 47
12 Conclusion 56 The question
What is the best representation for doing euclidean geometry on computers? Thisquestion is a fundamental one for practitioners of computer graphics, as wellas those working in computer vision, 3D games, virtual reality, robotics, CAD,animation, geometric processing, discrete geometry, and related fields. Whileavailable programming languages change and develop with reassuring regularity,the underlying geometric representations tend to be based on v ector and l inear a lgebra and a nalytic g eometry (VLAAG for short), a framework that has remainedvirtually unchanged for 100 years. These notes introduce projective geometricalgebra (PGA) as a modern alternative for doing euclidean geometry and showshow it compares to VLAAG, both conceptually and practically. In the nextsection we develop a basis for this comparison by drafting a wishlist for doingeuclidean geometry. Why fix it if it’s not broken?.
The standard approach (VLAAG) has proveditself to be a robust and resilient toolkit. Countless engineers and developers useit to do their jobs. Why should they look elsewhere for their needs? On the otherhand, long-time acquaintance and habit can blind craftsmen to limitations intheir tools, and subtly restrict the solutions that they look for and find. Manyprogrammers have had an “aha” moment when learning how to use the quaternionproduct to represent rotations without the use of matrices, a representation inwhich the axis and strength of the rotation can be directly read off from thequaternion rather than laboriously extracted from the 9 entries of the matrix,and which offers better interpolation and numerical integration behavior thanmatrices.
In the spirit of such “aha!” moments we propose here a feature list for doingeuclidean geometry. We believe all developers will benefit from a framework that: • is coordinate-free , • has a uniform representation for points, lines, and planes , • can calculate “parallel-safe” meet and join of these geometric entities, • provides compact expressions for all classical euclidean formulas and4onstructions, including distances and angles, perpendiculars and parallels,orthogonal projections, and other metric operations, • has a single, geometrically intuitive form for euclidean motions, onewith a single representation for operators and operands, • provides automatic differentiation of functions of one or several variables, • provides a compact, efficient model for kinematics and rigid bodymechanics , • lends itself to efficient, practical implementation , and • is backwards-compatible with existing representations including vector,quaternion, dual quaternion, and exterior algebras. In the rest of these notes we will introduce geometric algebra in general andPGA in particular, on the way to showing that PGA in fact fulfills the abovefeature list. The treatment is devoted to dimensions n = 2 and n = 3, the cases ofmost practical interest, and focuses on examples; readers interested in theoreticalfoundations are referred to the bibliography. Sect. 4 presents an “immersive”introduction to the subject in the form of three worked-out examples of PGA inaction. Sect. 5 begins with a short historical account of PGA followed by a bare-bones review of the mathematical prerequisites. This culminates in Sect. 6 wheregeometric algebra and the geometric product are defined and introduced. Sect. 7then delves into PGA for the euclidean plane, written P ( R ∗ , , ), introducing mostof its fundamental features in this simplified setting. Sect. 8 introduces PGA foreuclidean 3-space, focusing on the crucial role of lines, leading up to the Eulerequations for rigid body motion in PGA. Sect. 9 describes the native supportfor automatic differentiation. Sect. 10 briefly discusses implementation issues.Sect. 11 compares the results with alternative approaches, notably VLAAG,concluding that PGA is a universal solution that includes within it most if notall of the existing alternatives. Finally Sect. 12 provides an overview of availableresources for interested readers who wish to test PGA for themselves.5 Immersive introduction to geometric algebra
The main idea behind geometric algebra is that geometric primitives behavelike numbers – for example, they can be added and multiplied, can be expo-nentiated and inverted, and can appear in algebraic equations and functions.The resulting interplay of algebraic and geometric aspects produces a remarkablesynergy that gives geometric algebra its power and charm. Each flat primitive –point, line, and plane – is represented by an element of the algebra. The magiclies in the geometric product defined on these elements.We’ll define this product properly later on – to start with we want to firstgive some impressions of what it’s like and how it behaves.
To begin with it’s important to note that many features of PGA are alreadyfamiliar to many graphics programmers:. • It is based on homogeneous coordinates , widely used in computer graphics, • it contains within it classical vector algebra , • as well as the quaternion and dual quaternion algebras, increasingly populartools for modeling kinematics and mechanics, and • the exterior algebra , a powerful structure that models the flat subspaces ofeuclidean space.In the course of these notes we’ll see that PGA in fact resembles a organism inwhich each of these sub-algebras first finds its true place in the scheme of things. Other geometric algebra approaches.
Other geometric algebras have beenproposed for doing euclidean geometry, notably conformal geometric algebra (CGA). Interested readers are referred to the comparison article [Gun17b], whichshould shed light on the choice to base these notes on PGA.Before turning to the formal details we present three examples of PGA atwork, solving tasks in 3D euclidean geometry, to give a flavor of actual usage.Readers who prefer a more systematic introduction can skip over to Sect. 5.6 .2 Example 1: Working with lines and points in 3D
Task:
Given a point P and a non-incident line Π in E , find theunique line Σ passing through P which meets Π orthogonally. PΠ PΠ Π . P PΠ Π . P (Π . P)ΛΠ
PΠ Π . P ((Π . P)ΛΠ)VP (Π . P)ΛΠ
Figure 1: Geometric construction in PGA.In PGA, geometric primitives such as points, lines, and planes, are representedby vectors of different grades , as in an exterior algebra. A plane is a 1-vector, aline is a 2-vector, and a point is a 3-vector. (A scalar is a 0-vector; we’ll meet4-vectors in Sect. 4.4). Hence the algebra is called a graded algebra.Each grade forms a vector space closed under addition and scalar multipli-cation. An element of the GA is called a multivector and is the sum of such k -vectors. The grade- k part of a multivector M is written (cid:104) M (cid:105) k . The geometricrelationships between primitives is expressed via the geometric product that wewant to experience in this example. The geometric product ΠP , for example, ofa line Π (a 2-vector) and a point P (a 3-vector) consists two parts, a 1-vector In 3D PGA, lines are denoted with large Greek letters, points with large Latin letters, andplanes with small Latin ones. We write this as: ΠP = (cid:104) ΠP (cid:105) + (cid:104) ΠP (cid:105) (cid:104) ΠP (cid:105) is the plane perpendicular to Π passing through P . As the lowest-grade part of the product, it is written as Π · P .2. (cid:104) ΠP (cid:105) is the normal direction to the plane spanned by Π and P . We won’tneed it for this exercise.The sought-for line Σ can then be constructed as shown in Fig. 1:1. Π · P is the plane through P perpendicular to Π ,2. The point ( Π · P ) ∧ Π ) is the meet ( ∧ ) of Π · P with Π ,3. The line Σ := (( Π · P ) ∧ Π ) ∨ P is the join ( ∨ ) of this point with P .The meet ( ∧ ) and joint ( ∨ ) operators are part of the exterior algebra containedin the geometric algebra and are discussed in more detail below in Sect. 5.7.The next two examples show how euclidean motions (reflections, rotations,translations) are implemented in PGA. Figure 2: Creating a 3D kaleidoscope in PGA using sandwich operators.
Task: A k -kaleidoscope is a pair of mirror planes a and b in E thatmeet at an angle πk . Given some geometry G generate the view of G seen in the kaleidoscope. You are not expected at the point to understand why this is so. If you know about quaternions,you’ve met similar behavior. Recall that the quaternion product of two imaginary quaternions v := x i + y j + z k and v := x i + y j + z k satisfies: v v = − v · v + v × v . Hence, itis the sum of a scalar (the inner product) and a vector (the cross product). Something similar isgoing on here with the geometric product of a line and a point. We’ll see why in Sect. 6.2 below.Sect. 6.3 also sheds light on how the quaternions naturally occur within geometric algebra.
8n PGA, a is a 1-vector. We can and do normalize this 1-vector to satisfy a = 1, where a is the geometric product of a with itself. The geometric reflectionin plane a is implemented in PGA by the “sandwich” operator aGa (where G may be any k -vector – plane, line or point). See Fig. 2. The left-most imageshows the setup, where G is a red tube (modeled by some combination of 1-, 2-,and 3-vectors) stretching between the two planes. The middle image shows theresult of applying the sandwich bGb to the geometry (behind plane a one canalso see aGa , unlabeled). The fact that a = 1 is consistent with the fact thatrepeating a reflection yields the identity. The right image shows the result ofapplying all possible alternating products of the two reflections a and b to G (e.g., baGab , etc.). Since the mirrors meet at the angle π , this process closes up ina ring consisting of 12 copies of G . (To be precise, ( ab ) = ( ba ) = 1).Readers familiar with quaternions may recognize a similarity to the quaternionsandwich operators that implement 3D rotations – but here the basic sandwichesimplement reflections. The next example derives sandwich operators for rotationswithout using reflections. Task:
Represent a continuous screw motion in 3D.The general orientation-preserving isometry of E is a screw motion , that rotatesaround a unique fixed line (the axis ) while translating parallel to it. The ratio ofthe translation distance to the angle of rotation (in radians) is called the pitch ofthe screw motion. A rotation has pitch 0, and translation has pitch “ ∞ ”.Figure 3: Continuous rotation, translation, and screw motion in PGA by expo-nentiating a bivector.The previous example already contains rotations: a reflection in a plane a followed by a reflection in a second plane b (i. e., b ( aGa ) b ) is a rotation around9heir common line by twice the angle between them, in this case π . Here we usea different approach to obtain a desired rotation directly from its axis of rotation.A line in E , passing through the point P with direction vector V , is given by thejoin operation Ω := P ∨ V (yellow line in Fig. 3). We can and do normalize Ω to satisfy Ω = −
1. (Where Ω means multiply Ω by itself using the geometricproduct.) To obtain the rotation around Ω of angle α define the motor e t Ω .The exponential function is evaluated using the geometric product in the formalpower series of e ( x ); it behaves like the imaginary exponential e ti since Ω = − sandwich operator e t Ω G e − t Ω implements the continuous rotation around Ω applied to G , parametrized by t . At t = 0 it is the identity; and at t = α itrepresents the rotation of angle α around Ω . See the left image above, whichshows the result for a sequence of t -values between 0 and π . Readers familiarwith the quaternion representation of rotations should recognize the similarity ofthese formulas. This isn’t accidental – see Sect. 11.3.4 below.To obtain instead a translation in the direction of Ω , we used a different line,obtained by applying the polarity operator of PGA to Ω to produce Ω ⊥ . Ω ⊥ isthe orthogonal complement of Ω , an ideal line, or so-called “line at infinity”. Itconsists of all directions perpendicular to Ω . If Ω is thought of as a vertical axis,then Ω ⊥ is the horizon line. The orthogonal complement is obtained in PGAby multiplying by a special 4-vector, the unit pseudoscalar I : Ω ⊥ := ΩI . Acontinuous translation in the direction of Ω is then given by a sandwich with the translator e t Ω ⊥ . See the middle image above.Let the pitch of the screw motion be p ∈ R . Then the desired screw motionis given by a sandwich operator with the motor e t ( Ω + p Ω ⊥ ) . This motion can befactored as the product of a pure rotation and a pure translation in either order: e t ( Ω + p Ω ⊥ ) = e t Ω e tp Ω ⊥ = e tp Ω ⊥ e t Ω . See image on the right above.We hope these examples have whetted your appetite to explore further. Wenow turn to a quick exposition of the history of PGA followed by a modernformulation of its mathematical foundations. The pseudoscalar is one of the most powerful but mysterious features of geometric algebra. Mathematical foundations
Both the standard approach to doing euclidean geometry and the geometricalgebra approach described here can be traced back to 16th century France.The analytic geometry of Ren´e Descartes (1596-1650) leads to the standardtoolkit used today based on Cartesian coordinates and analytic geometry. Hiscontemporary and friend Girard Desargues (1591-1661), an architect, confrontedwith the riddles of the newly-discovered perspective painting, invented projectivegeometry , containing additional, so-called ideal , points where parallel lines meet.Projective geometry is characterized by a deep symmetry called duality , thatasserts that every statement in projective geometry has a dual partner statement,in which, for example, the roles of point and plane, and of join and intersect, areexchanged. More importantly, the truth content of a statement is preserved underduality. We will see below that duality plays an important role in PGA.Mathematicians in the 19th century (Cayley and Klein) showed how, usingan algebraic structure called a quadratic form , the euclidean metric could bebuilt back into projective space. (The same technique also worked to model thenewly discovered non-euclidean metrics of hyperbolic and elliptic geometry inprojective space.) This
Cayley-Klein model of metric geometry forms an essentialfoundation of PGA. While these developments were underway in geometry, WilliamHamilton and Herman Grassmann discovered surprising new algebraic structuresfor geometry. All these dramatic developments flowed together into WilliamClifford’s invention of geometric algebra in 1878 ( [Cli78]). We now turn tostudying from a modern perspective the ingredients of geometric algebra.
We assume that the reader is familiar with the concept of a real vector space ofdimension n , where n is the cardinality of a maximal linearly independent setof elements, called vectors . Vectors are often thought of as n -tuples of numbers:these arise through the choice of a basis for the vector space, and represent thecoordinates of that vector with respect to the basis. A vector space is closedunder addition and scalar multiplication. For each vector space V there existsan isomorphic dual vector space V ∗ , consisting of dual vectors, or co-vectors . A11igure 4: Important figures in the development of PGA (l. to r.): HermannGrassmann (1809-1877), Arthur Cayley (1821-1895), Felix Klein (1849-1925),William Clifford (1845-1879).co-vector θ is a linear functional that can be evaluated at a vector v to producea real number: (cid:104) θ, v (cid:105) ∈ R . This evaluation map is bilinear. It is not an innerproduct, that is defined on pairs of vectors. See the next section below. Example. . When n = 3, v can be interpreted as a line through the origin and θ , as a plane through the origin, and (cid:104) θ, v (cid:105) ∈ R = 0 ↔ v lies in the plane θ . A real vector space V of dimension n has no way to measure angles or distancesbetween elements. For that, introduce a symmetric bilinear form B : V × V → R . B is a map satisfying1. B ( α u + β u , v ) = αB ( u , v ) + βB ( u , v ) (bilinearity), and2. B ( u , v ) = B ( v , u ) (symmetry).A symmetric bilinear form B can be rewritten as an inner product on vectors: u · v := B ( u , v ) and used to define a norm , or length-function, on vectors: (cid:107) u (cid:107) := (cid:112) | u · u | . R n is a normed vector space. The next section classifiessymmetric bilinear forms. Symmetric bilinear forms of dimension n can be completely characterized by threepositive integers ( p, m, z ) satisfying p + m + z = n . Sylvester’s Theorem assertsthat for any such B there is a unique choice of ( p, m, z ) and a basis { e i } for V such that 12. e i · e j = 0 for i (cid:54) = j (orthogonal basis), and2. e i · e i = ≤ i ≤ p − p < i ≤ p + m (normalized basis)0 for p + m < i ≤ n Example.
Taking n = 3 and ( p, m, z ) = (3 , ,
0) we arrive at the familiareuclidean vector space R with norm (cid:107) ( x, y, z ) (cid:107) = (cid:112) x + y + z where ( x, y, z )are coordinates in an orthonormal basis. n We can transform the vector space R n into the metric space E n by identifyingeach vector of the former (also the zero vector O ) with a point of the latter. Thendefine a distance function on the resulting points with d ( P , Q ) := (cid:107) P − Q (cid:107) . Thisdistance function produces a differentiable manifold E n whose tangent space atevery point is R n . Terminology alert.
When we say doing euclidean geometry we are referringto the geometry of euclidean space E n , not the euclidean vector space R n . Theelements of E n are points, those of R n are vectors; the motions of E n includetranslations and rotations, those of R n are rotations preserving the origin O . E n is intrinsically more complex than R n : the tangent space at each point is R n .See [Gun17b], §
4, for a deeper analysis of this issue. We will see that euclideanPGA includes both E n and R n in an organic whole. Vector spaces have linear subspaces. The subspace structure is mirrored in thealgebraic structure of the exterior algebra defined over the vector space. To definethe exterior algebra cleanly, we need first to introduce the tensor algebra T ( V )over V . This algebra is generated by multiplying arbitrary sequences of vectorstogether to generate a graded algebra. This product is called the tensor product and is written ⊗ . It is bilinear. The tensor product of k vectors is called a k -vector. The k -vectors form a vector space T k . T is the underlying field R .13 ( V ) can be written as the direct sum of these vector spaces: T = ∞ (cid:77) i =0 T k Obviously this is a very big and somewhat unwieldy structure, but necessary fora clean definition of important algebras below.
Example n = 2 . The tensor algebra of a 2-dimensional vector space with basis { u , v } has the basis: • T : { }• T : { u , v }• T : { u ⊗ u , u ⊗ v , v ⊗ u , v ⊗ v }• T : { u ⊗ u ⊗ u , u ⊗ u ⊗ v , u ⊗ v ⊗ u , u ⊗ v ⊗ v , v ⊗ u ⊗ u , v ⊗ u ⊗ v , v ⊗ v ⊗ u , v ⊗ v ⊗ v }• etc. The exterior algebra is obtained from the tensor algebra by declaring elementsof the form v ⊗ v (where u and v are 1-vectors), to be equivalent to 0, that is,squares of 1-vectors vanish. By bilinearity, this implies( u + v ) ⊗ ( u + v ) = u ⊗ u + v ⊗ v + u ⊗ v + v ⊗ u ∼ = 0implying u ⊗ v ∼ = − v ⊗ u since u ⊗ u ∼ = 0 and v ⊗ v ∼ = 0. Thus the quotientproduct is anti-symmetric on 1-vectors. The resulting quotient algebra is calledthe exterior algebra and its product is the exterior or wedge product, written as X ∧ Y . The product is associative, anti-symmetric on 1-vectors and distributesover addition. In general, the wedge of a k -vector X and an m -vector Y willvanish ⇐⇒ X and Y are linearly-dependent subspaces, otherwise it is the( k + m )-vector representing the subspace span of X and Y .The exterior algebra G ( V ) mirrors the subspace structure of V . Two k -vectors v and α v that are non-zero multiples of each other represent the same subspacebut have different weights , or intensities. G ( V ) is finite-dimensional since any m -vector in the tensor algebra with m > n vanishes in the exterior algebra sinceany product of n + 1 basis 1-vectors will have a repeated factor, and this is14quivalent to 0. It can be written as a direct sum of its non-vanishing grades: G ( V ) = n (cid:77) i =0 (cid:94) i The dimension of each grade is given by dim (cid:16)(cid:86) k (cid:17) = (cid:0) nk (cid:1) , so the total dimensionof the algebra is Σ ni =0 (cid:0) nk (cid:1) = 2 n . Example n = 2 . The exterior algebra of a 2-dimensional vector space withbasis { u , v } is a 4-dimensional graded algebra: • (cid:86) : { }• (cid:86) : { u , v }• (cid:86) : { u ∧ v } Exterior algebras were, like so many other results in this field, discovered byHermann Grassmann ( [Gra44]) and are sometimes called
Grassmann algebras.
Important for PGA: the dual vector space V ∗ generates its own exterior algebra G ( V ∗ ) = G ∗ ( V ). The standard exterior algebra represents the subspace structurebased on subspace join , where the 1-vectors are vectors (or lines through theorigin). The dual exterior algebra represents the subspace structure “turned onits head”: the 1-vectors represent hyperplanes through the origin and the wedgeoperation is subspace meet . The principle of duality ensures that these twoapproaches are completely equivalent and neither a priori is to be preferred. Eachconstruction produces a separate exterior algebra. The dual exterior algebra isimportant for PGA.The next step on our way to PGA is projective geometry . An n -dimensional real vector space V can be projectivized to produce ( n − R P n − . This is a quotient space constuction asin the case of the exterior algebra. Here the equivalence relation on vectors of V is u ∼ = v ↔ ∃ λ (cid:54) = 0 ∈ R such that u = λ v points of R P n are the lines through the origin of V . Example. R P is called the projective plane. We consider it as arising fromprojectivizing R (although the norm on R plays no role in the construction).Take R with standard basis { e , e , e vectors pointing in the x -, y -, and z -directions, resp.) Each point P of the z = 1 plane represents the line throughthe origin obtained by joining P to the origin. Hence P corresponds to a pointof R P . The only points of R P not accounted for in this way arise from linesthrough the origin lying in the z = 0 plane, since such lines don’t intersect the z = 1 plane. However in projective geometry they correspond to points; it isuseful to speak of ideal points of R P where these lines intersect the plane z = 1.The intersection of parallel planes yields in the same way an ideal line. Theinterplay of euclidean and ideal elements in PGA is essential to its effectiveness.Figure 5: Traversing the boundary of a triangle ( left ) and a trilateral ( right ). Example of duality in R P . Because duality plays an essential role inPGA, we include an example here to show how it works. Following the patternestablished in the 19 th century literature we use a two-column format to present,on the left, a geometric configuration in the projective plane and, on the right,its dual configuration. Dualized terms have been highlighted in color. Fig. 5illustrates this example. 16 triangle is determined by threepoints, called its vertices. The pair-wisejoining lines of the vertices are the sidesof the triangle. To traverse the bound-ary of the triangle, move a point fromone vertex to the next vertex along theircommon side, then take a turn and con-tinue moving along the next side. Con-tinue until arriving back at the originalvertex. A trilateral is determined by threelines, called its sides. The pair-wise in-tersection points of the sides are thevertices of the trilateral. To traversethe boundary of the trilateral, rotate aline from one side to the next aroundtheir common vertex, then shift overand continue rotating round the nextvertex. Continue until arriving back atthe original side.Perhaps you can experience that the left-hand example is somehow morefamiliar than the right-hand side. After all, we learn about triangles in school, nottrilaterals. This seems to be related to the fact that we think of points as beingthe basic elements of geometry (and reality) out of which other elements (lines,planes) are built. We’ll see below in Sect. 6.4 however that PGA in importantrespects challenges us to think in the right-hand mode. Why projectivize?
Working in projective space guarantees that the meet ofparallel lines and planes, as well as the join of euclidean and ideal elements, arehandled seamlessly, without “special casing” – one of the features on our initialwish-list. Furthermore we’ll see that only in projective space can we representtranslations.
The same construction applied to create R P n from V can be applied to theGrassmann algebras G ( V ) and G ∗ ( V ) to obtain projective exterior algebras. Wedenote these projectivized versions as P ( G ( V )) and P ( G ∗ ( V ). Here we use an( n + 1)-dimensional V so that we obtain R P n by projectivizing. The resultingexterior algebras mirror the subspace structure of R P n : 1-vectors in G representpoints in P ( G ), 2-vectors represent lines, etc., and ∧ is projective join. In thedual algebra G ∗ , 1-vectors are hyperplanes (( n − n -vectors represent points, while ∧ is the meet operator. More generally: in astandard projective exterior algebra P ( G ), the elements of grade k for k = 1 , , ...n ,represent the subspaces of dimension k −
1. For example, for n = 2, the 1-vectors17re points, and the 2-vectors are lines. The graded algebra also has elements ofgrade 0, the scalars (the real numbers R ); and elements of grade ( n + 1) (thehighest non-zero grade), the pseudoscalars .Figure 6: Left:
The plane e ∧ e ∧ e (green) created by joining 3 points in P ( G ),the standard exterior algebra (written with raised indices). Right:
The meetingpoint e ∧ e ∧ e (green) of three planes in P ( G ∗ ), the dual exterior algebra(written with lowered indices). Example.
Fig. 6 shows how the wedge product of three points in P ( G ) is aplane, while the wedge product of three planes in P ( G ∗ ) is a point. Notice theuse of subscripts and superscripts to distinguish between the two algebras. It’s important for what follows to clarify the notion of the dimension of a subspace.We are accustomed to say that a point in R P n is a 0-dimensional subspace. Thisis indeed the case in the context of the standard exterior algebra where pointsare represented by 1-vectors. Then all other linear subspaces are built up out ofthe 1-vectors by wedging (joining) points together. The dimension counts howmany 1-vectors are needed to generate a subspace. For example, a line (2-vector)can be represented as the join of two points (cid:96) = A ∧ B . (cid:96) is 1-dimensional sincethere is a one-parameter set of points incident with the line, given by α A + β B where only the ratio α : β matters. A line considered as a set of incident pointsis called a point range . In general, if you wedge together k linearly independent18oints you obtain a k − X = P ∧ ... ∧ P k .Then X ∧ P = 0 ⇐⇒ P ∼ = α P + ... + α k P k for real constants { α i } . Sincewe are working in projective space, this is a ( k − { α i } ≡ β { α i } for non-zero β ).When we apply this reasoning to the dual exterior algebra, we are led tothe surprising conlusion that a plane (a 1-vector) is 0-dimensional, since all theother linear subspaces are built up from planes by the meet operation. Thatis, in the dual algebra planes are simple and indivisible, just as a point in thestandard algebra is. A line (2-vector) is the meet of two planes (cid:96) = a ∧ b . (cid:96) is1-dimensional since there is a one-parameter set of planes incident with the line,given by α a + β b where only the ratio α : β matters. A line considered as a set ofincident planes is called a plane pencil . It’s the form you get if you spin a planearound one of its lines. The meet of three planes is a point. The set of all planesincident with the point is 2-dimensional, called a plane bundle, etc. To thinkin this way you have to overcome certain habits that associate dimension withextensive “size”. Take-away.
The dimension of a geometric primitive depends on whether it isviewed in the standard exterior algebra or the dual exterior algebra. The 1-vectorsserve as the “building block” in both cases. For example, in the standard algebraa point is 0-dimensional, simple, and indivisible. In the dual algebra, however, itis two-dimensional, since it is created by wedging together three planes, or, whatis the same, there is a two-parameter family of planes incident with it.
Every geometric entity x (e.g., point, line, plane) occurs once in each exterioralgebra, say as x ∈ P ( G ) and as x ∗ ∈ P ( G ∗ ). The Poincar´e duality map J : P ( G ) → P ( G ∗ ) is defined by x → x ∗ . It is essentially an identity map,sometimes called the “dual coordinates” map. In particular it is invertible.When often use J for both maps when there is no danger of confusion. J is agrade-reversing map, that is a vector space isomorphism (cid:86) k ↔ (cid:86) n +1 − k for all k .See [Gun11a] § .10.3 The regressive product Using J , it’s possible to “import” the outer product from one algebra into thethe other. This imported product is sometimes called the regressive product todistinguish it from the native wedge product. For example, it possible to define ajoin operator ∨ in P ( G ∗ ) by X ∨ Y := J − ( J ( X ) ∧ J ( Y ))where the ∧ on the right-hand side is that of the algebra P ( G ). In this way,join and meet are available within a single algebra. We’ll see below in Sect. 6.4why this is important for PGA . We write the outer product of P ( G ∗ ), the meetoperator, as ∧ , and the join operator, imported from P ( G ), as ∨ . That’s easy toremember due to their similarity to the set operations ∩ and ∪ . References.
The above mathematical prerequisites can be well-studied onWikipedia in the articles on: vector space, bilinear form, quadratic form, tensoralgebra, exterior algebra, and projective space. We turn now to the geometricproduct and associated geometric product.
The exterior algebra of R P n answers questions regarding incidence (meet andjoin) of projective subspaces. That’s an important step and yields uniformrepresentation of points, lines, and planes as well as a “parallel-safe” meet andjoin operators, both features from our wish-list.However the exterior algebra knows nothing about measurement, such asangle and distance, crucial to euclidean geometry. To overcome this we refine theequivalence relation that we used to produce the exterior algebra from the tensoralgebra T. Instead of requiring that v ⊗ v ∼ = 0 we require that v ⊗ v − B ( v , v ) ∼ = 0where B is a symmetric bilinear form, that is v ⊗ v is equivalent to a scalar but notnecessarily to 0 as in an exterior algebra. We define the geometric algebra with Sometimes called a Clifford algebra in honor of its discoverer [Cli78]. Clifford however called B to be the quotient of the tensor algebra by this new equivalencerelation. Since this relation encodes an inner product on vectors, the geometricproduct contains more information than the exterior product. We write thegeometric product using simple juxtaposition: XY .Since the square of every 1-vector reduces to a scalar (0-vector), we obtainthe same finite-dimensional graded algebra structure for the geometric algebra asfor the exterior algebra, described in Sect. 5.7. In fact, as we now show, one canalso construct the geometric algebra by extending the exterior algebra. Alternative formulation. . Define the geometric product of two 1-vectors u and v to be uv := u · v + u ∧ v where · is the inner product associated to B and ∧ is the wedge product in theassociated exterior algebra. (I. e., skip the tensor algebra formulation entirely.)Then it’s possible to show that this geometric product has a unique extension tothe whole graded algebra that agrees with the geometric product obtained aboveusing the more abstract tensor product construction. Connection to exterior algebra.
The geometric algebra reduces to theexterior algebra when B is trivial: B ( u , v ) = 0, equivalent to a signature of(0 , , n ). In order to apply the Cayley-Klein construction for modeling metric spacessuch as euclidean space, we work in projective space. That is, we interpret thegeometric product in a projective setting just as we did with the wedge productin the projectivized exterior algebra. We call the result a projective geometricalgebra or PGA for short. It uses ( n + 1)-dimensional coordinates to model n − dimensional euclidean geometry. The standard geometric algebra based on P ( G )with signature ( p, m, z ) is denoted P ( R p,m,z ). The dual version of the same (basedon P ( G ∗ )) is written P ( R ∗ p,m,z ). Remark.
PGA is actually a whole family of geometric algebras, one for eachsignature; the rest of these notes concern finding and exploring the member of it a geometric algebra, and we follow him.
In general, the geometric product of a k -vector and an m -vector is a sum ofcomponents of different grades, each expressing a different geometric aspect of theproduct, as in the geometric product of two 1-vectors above. A general elementcontaining different grades is called a multivector . A multivector M can be writtenthen as a sum of different grades: M = (cid:80) ni =0 (cid:104) M (cid:105) i . For example, we can write theabove geometric product of two 1-vectors as: ab := (cid:104) ab (cid:105) + (cid:104) ab (cid:105) . The productof two multivectors can be reduced to a sum of products of single-grade vectors,so we concentrate our discussions on the latter.The highest grade part of the product is the ( k + m )-grade part, and coincideswith the ∧ product in the exterior algebra. All the other parts of the productinvolve some “contraction” due to the square of a 1-vector reducing to a scalar(0-vector), which drops the dimension of the product down by two for each suchsquare. We define the lowest-grade part of the geometric product of a k -vectorand an m -vector to be the inner product and write a · b (it does not have to be ascalar!). It has grade | k − m | .We will occasionally also need the commutator product X × Y := ( XY − YX ),the so-called anti-symmetric part of the geometric product. A k -vector whichcan be written as the product of 1-vectors is called a simple k -vector. Note thatthen all the 1-vectors are orthogonal to each other and the product is equal tothe wedge product of the 1-vectors. Any multi-vector can be written as a sum ofsimple k -vectors. We sometimes call 2-vectors bivectors , and 3-vectors, trivectors .We’ll also need the reverse operator (cid:101) X , that reverses the order of the productsof 1-vectors in a simple k -vector. If the simple k -vector is X , then the reverse (cid:101) X = ( − k ) X . The exponent counts how many “neighbor flips” are requiredto reverse a string with k characters (since for orthogonal 1-vectors a and b , ba = − ab ).We first explore the algebra P ( R , , ) in order to warm up in a familiar setting.22 e e e E E E I1 1 e e e E E E Ie e E − E I − e e E e e − E e I − e E e e E − E − e e I E E E I − e e − − E E − e E E e I − e E − − E − e E E − e e I − E E − − e I I E E E − e − e − e − Table 1: Multiplication table for P ( R , , ), the geometric algebra of the sphere. ( R , , ) This is the projectivized geometric algebra of R , the familiar 3D euclidean vectorspace. Take an orthonormal basis { e , e , e ). Then a general 1-vector is given by u = x e + y e + z e . It satisfies u = x + y + z = (cid:107) u (cid:107) . The set of 1-vectorssatisfying (cid:107) u (cid:107) = 1 forms the unit sphere (whereby u and − u represent the sameprojective point in the algebra). We saw above, the product of two normalized1-vectors is given by uv := u · v + u ∧ v . Here u · v = cos α where α is the anglebetween the spherical points u and v , and u ∧ v is the line (2-vector) spanned bythe points (represented by a great circle joining the points.)An orthonormal basis for the 2-vectors is given by { E := e e , E := e e , E := e e } These are three mutually perpendicular great circles. The unit pseudo-scalar is I := e := e e e . Multiplication of either a 1- or 2-vector with I produces theorthogonal complement X ⊥ of the argument X . That is, u ⊥ = uI is the greatcircle that forms the “equator” to the “pole” point represented by u ; UI for a2-vector U produces the polar point of the “equator” represented by U . Thecomplete 8 x Exercise..
Check in the multiplication table that the products e i I = E i and E i I = − e i for i ∈ { , , } and verify that these results confirm that multiplicationby I is the “orthogonal complement” operator.23 xercise. Show that the angle α between two normalized 2-vectors (greatcircles) in P ( R , , ) is given by α = cos − ( U · V ). Exercise.
Verify that the elements { , e , e , e } generates a sub-algebra of P ( R , , ) that is isomorphic to Hamilton’s quaternion algebra H generated by { , i, j, k } . Exercise.
Find as many formulas of spherical geometry/trigonometry as youcan within P ( R , , ). Exercise. P ( R ∗ , , ) is the same algebra as above but uses the dual constructionwhere the 1-vectors are lines (great circles). Show that it also provides a modelfor spherical geometry, one in which the U · V = cos α for normalized 1-vectors U and V meeting at angle α .The above discussion gives a rudimentary demonstration of how the signature(3 , ,
0) leads to a model of spherical geometry in both the standard and dualconstructionsWe now turn to the question of which member of the PGA family models theeuclidean plane. That is, we need to determine a signature and, possibly, choosebetween the standard and dual construction. The existence of parallel lines ineuclidean geometry plays an essential role in this search.
We saw that the inner product of 1-vectors in P ( R ∗ , , ) can be used to computethe angle between two lines in spherical geometry. What does the analogousquestion in the euclidean plane yield? Let a x + b y + c = 0 , a x + b y + c = 0be two oriented lines which intersect at an angle α . We can assume without lossof generality that the coefficients satisfy a i + b i = 1. Then it is not difficult toshow that a a + b b = cos α . One can observe for example that the direction ofline i is ( − b i , a i ) and calculate the angle of these direction vectors. The superfluous coordinate.
The third coordinate of the lines makes nodifference in the angle calculation! Indeed, translating a line changes only its thirdcoordinate, leaving the angle between the lines unchanged. Refer to Fig. 7 which24igure 7: Angles of euclidean lines.shows an example involving a general line and a pair of horizontal lines. Choose abasis for the (dual) projective plane so that e corresponds to the line x = 0, e to y = 0, and e to z = 0. Then the line given by ax + by + c = 0 corresponds tothe 1-vector c e + a e + b e . If the geometric product of two such 1-vectors is toproduce a a + b b then the signature has to be (2 , , E is P ( R ∗ , , ). Such a signature, or metric, is called degenerate since z (cid:54) = 0. Reminder:
The ∗ in the name says that the algebra is built on P ( G ∗ ), thedual exterior algebra, since the inner product is defined on lines instead of points.A similar argument applies in dimension n , yielding the signature ( n, ,
1) for E n . P ( R n, , ) models a qualitatively different metric space called dual euclidean space . Degenerate metric: asset or liability?
PGA’s development reflects the factthat much of the existing literature on geometric algebras deals only with non-degenerate metrics, reflecting widespread prejudices regarding degenerate metrics.(See [Gun17b] for a thorough analysis and refutation of these misconceptions.)After long experience we are convinced that the degenerate metric, far from beinga liability, is an important part of PGA’s success – exactly the degenerate metricmodels the metric relationships of euclidean geometry faithfully (see [Gun17b], The unusual ordering is chosen since it is more convenient if in every dimension the“superfluous” coordinate always has the same index. e e • • • • • • E E E Figure 8: Fundamental triangle of coordinate system. § ( R ∗ , , ) We give now a brief introduction to PGA by looking more closely at euclidean planegeometry. Readers can find more details in [Gun17a]. The approach presentedhere can be carried out in a coordinate-free way ( [Gun17a], Appendix). But foran introduction it’s easier and also helpful to refer occasionally to coordinates.The coordinates we’ll use are sometimes called affine coordinates for euclideangeometry. We add an extra coordinate to standard n -dimensional coordinates.For n = 2: • Point: ( x, y ) → ( x, y, • Direction: ( x, y ) → ( x, y, e represents the ideal line, sometimes called the “line at infinity” and written ω to remind us that it is defined in a coordinate-free way. e and e represent thecoordinate lines x = 0 and y = 0, resp. These basis vectors satisfy e = 0 and e = e = 1, consistent with the signature (2 , , e i e j = e i ∧ e j when i (cid:54) = j . A basis for the 2-vectors is given by the products (i.e., intersection points) of these orthogonal basis lines: E := e e , E := e e , E := e e e e e E E E I1 1 e e e E E E Ie e E − E I e e − E e I − e E e e E − E − e e I E E E I − e e − − E E − e E E I − e E E E e I − E I I E E − e P ( R ∗ , , )whereby E is the origin, E and E are the x - and y − directions (ideal points),resp. They satisfy E = − E = E = 0. That is, the signature on the2-vectors is more degenerate: (1 , , I := e e e represents the whole plane and satisfies I = 0. The full 8x8 multiplication tableof these basis elements can be found in Table 2. Exercise.
1) For a 1-vector m = a e + b e + c e , m = a + b . 2) For a2-vector P = x E + y E + z E , P = − z . k -vectors From the previous exercise, the square of any k -vector is a scalar. When it isnon-zero, the element is said to be euclidean , otherwise it is ideal . Just as witheuclidean vectors in R n , it’s possible and often preferable to normalize simple k -vectors. Euclidean k -vectors can be normalized by the formula (cid:98) X := X (cid:112) | X | Then (cid:98) X satisfies X = ± a , the element (cid:98) a := a √ a represents the same line but isnormalized so that (cid:98) a = 1. A euclidean point P = x E + y E + E is normalizedand satisfies P = − This gives rise to a standard norm on euclidean k -vectors The point − P is a normalized form for P also but we use positive z -coordinate wherever that we write (cid:107) X (cid:107) . Such a normalization is not possible for ideal elements, since these satisfy X = 0.It turns out that there is a “natural” non-zero norm on ideal elements that arisesby requiring that the inner product of any 2 ( n − n -dimensional flatswhose intersections with the ideal plane are these two ideal flats. For example,when n = 2 this means that the inner product of ideal points is the same as theinner product of any pair of lines meeting the ideal line in these points. Thereader can check that this is well-defined by recalling that moving a line parallelto itself does not change its angle to other lines.If the two lines are a i e + b i e + c i e ) their inner product is ( a a + b b ) andtheir ideal points are a i E + b i E . In order for the inner product of these twolines to be ( a a + b b ) it’s clear that the signature on the ideal line has to be(2 , , n, , n − n, , R n : ideal points are identical with euclideanvectors, a fact already recognized by Clifford [Cli73]. In the projective setting wesay that the ideal plane has an elliptic metric.In fact, rather than starting with the euclidean planes and deducing theinduced inner product on ideal lines as sketched above, it is also possible to startwith this inner product on the ideal elements and extend it onto the euclideanelements (i. e., the inner product of two euclidean lines is defined to be the innerproduct of their two ideal points). This approach to the ideal norm is sketched inthe appendix of [Gun17a].In the case of n −
2, this yields an ideal norm with the following properties. • Point
In terms of the coordinates introduced above, for an ideal point V = x E + y E , (cid:107) V (cid:107) ∞ := (cid:112) x + y . A coordinate-free definition of theideal norm of an ideal point V is given by (cid:107) V (cid:107) ∞ := (cid:107) V ∨ P (cid:107) for anynormalized euclidean point P . • Line
The ideal norm for an ideal line m = c e is given by (cid:107) m (cid:107) ∞ := c . Thiscan be obtained in a coordinate-free way via the formula (cid:107) m (cid:107) ∞ = m ∨ P possible. P is any normalized euclidean point. Using the ∨ operator insteadof ∧ produces a scalar directly instead of a pseudoscalar with the samenumerical value. • Pseudoscalar
We can also consider the pseudoscalar as an ideal elementsince since I = 0. The ideal norm for a pseudoscalar a I is (cid:107) a I (cid:107) ∞ = a .Note that the ideal norms for lines and pseudoscalars are signed magnitudes. Thisis due to the fact that they belong to 1-dimensional subspaces that allow such acoordinate-free signed magnitude (based on the single generator). To distinguishthem from traditional (non-negative) norms we call them numerical values butuse the same notation (cid:107) ... (cid:107) ∞ for both. Another neat way to compute the ideal norm is provided by Poincar´e duality. Thediscussion of Poincar´e duality above in Sect. 5.10 took place at the level of theGrassmann algebra. It’s possible to consider this map to be between geometricalgebras, in this case, J : P ( R ∗ , , ) → P ( R , , ). We leave it as an exercisefor the reader to verify that for ideal x ∈ P ( R ∗ , , ), (cid:107) x (cid:107) ∞ = (cid:107) J ( x ) (cid:107) (where bysleight-of-hand the scalar on the right-hand side is interpreted as a scalar in P ( R ∗ , , )). That is, the ideal norm in the euclidean plane is the ordinary normin the dual euclidean plane. Naturally the same holds for arbitrary dimension.Whether this “trick” has a deeper meaning remains a subject of research.We will see that the two norms – euclidean and ideal – harmonize remarkablywith each other, producing polymorphic formulas – formulas that produce correctresults for any combination of euclidean and ideal arguments. The sequel presentsnumerous examples. Weight of a vector.
Regardless of the type of norm, if an element satisfies (cid:107) X (cid:107) = d ∈ R , we say it has weight d . The normed elements have weight 1. Atypical computation requires that the arguments are normalized; the weight ofthe result then gives important insight into the calculation. That means, we don’twork strictly projectively, but use the weight to distinguish between elementsthat are projectively equivalent. We will see this below, in the section on 2-wayproducts. In the discussions below, we assume that all the arguments have beennormalized with the appropriate norm since, just as in R n , it simplifies manyformulas. 29 .2 Examples: Products of pairs of elements in 2D We get to know the geometric product better by considering basic products.We consider first multiplication by the pseudoscalar I , then turn to products ofpairs of normalized euclidean points and lines. It may be helpful to refer to themultiplication table (Table 2) while reading this section. Also, consult Fig. 9which illustrates many of the products discussed below. A fuller discussion canbe found in [Gun17a]. b b I Q P P v Q P x Q P a . a P v ||P x Q|| a b v a ( ) cos (a b) . -1 ∞ P a . a Figure 9: Selected geometric products of pairs of simple vectors.
Multiplication by the pseudoscalar.
Multiplication by the pseudoscalar I maps a k -vector onto its orthogonal complement with respect to the euclideanmetric. For a euclidean line a , a ⊥ := aI is an ideal point perpendicular tothe direction of a . For a euclidean point P , P ⊥ := PI is the ideal line e .Multiplication by I is also called the polarity on the metric quadric , or just thepolarity operator. Product of two euclidean lines.
We saw above that this product can be30sed as the starting point for the geometric product: ab = a · b + a ∧ ba · b = (cid:104) ab (cid:105) = cos α , where α is the oriented angle between the two lines ( ± a ∧ b = (cid:104) ab (cid:105) is their intersectionpoint. If we call the normalized intersection point P (using the appropriate norm),then (cid:104) ab (cid:105) = (sin α ) P when the lines intersect and (cid:104) ab (cid:105) = d ab P when the linesare parallel and are separated by a distance d ab . Here we see the remarkablefunctional polymorphism mentioned earlier, reflecting the harmonious interactionof the two norms. Product of two euclidean points.PQ = (cid:104) PQ (cid:105) + (cid:104) PQ (cid:105) = − d P Q V The inner product of any two normalized euclidean points is -1. This illustratesthe degeneracy of the metric on points: every other point yields the same innerproduct with a given point! The grade-2 part is more interesting: it is thedirection (ideal point) perpendicular to the joining line P ∨ Q . It’s easy toverify that (cid:104) PQ (cid:105) = P × Q . V in the formula is the normalized form of P × Q .Then the formula shows that the distance d P Q between the two points satisfies d P Q = (cid:107) P × Q (cid:107) ∞ : while the inner product of two points cannot be used to obtaintheir distance, (cid:104) PQ (cid:105) can. Here are two further formulas that yield this distance: d P Q = (cid:107) P ∨ Q (cid:107) = (cid:107) P − Q (cid:107) ∞ . Product of euclidean point and euclidean line.
This yields a line and apseudoscalar, both of which contain important geometric information: aP = (cid:104) aP (cid:105) + (cid:104) aP (cid:105) = a · P + a ∧ P = a ⊥ P + d aP I Here a ⊥ P := a · P is the line passing through P perpendicular to a , while thepseudoscalar part has weight d aP , the euclidean distance between the point andthe line. Note that this inner product is anti-symmetric: P · a = − a · P . Practice in thinking dually: more about a · P. You might be wondering,31hy is a · P a line through P perpendicular to a ? This is a good opportunity topractice thinking in the dual algebra. We are used to thinking of lines as beingcomposed of points. That however is only valid in the standard algebra P ( G ).In the dual algebra, we have to think of points as being composed of lines! The1-vectors (lines) are the building blocks; they create points via the meet operator.A point “consists” of the lines that pass through it – called the line pencil in P .This is analogous to thinking of a line as consisting of all the points that lie on it– called the point range on the line. Consider a · P in this light.When P lies on a then we can write P = ab for the orthogonal line b through P . Then aP = aab = b since a = 1. Hence the claim is proven. When P doesnot lie on a the multiplication removes the line through P parallel to a from thegrade-1 part of the product, leaving as before the line b orthogonal to a . Weleave the details as an exercise for the reader. (Hint: any line parallel to a is ofthe form a + k e .) This example shows why the inner product is often called a contraction since it reduces the dimension by removing common subspaces. Remarks regarding 2-way products.
In the above results, you can alsoallow one or both of the arguments to be ideal; one obtains in all cases meaningful,“polymorphic” results. We leave this as an exercise for the interested reader.Interested readers can consult [Gun17a]. The above formulas have been collectedin Table 3. Note that the formulas assume normalized arguments.After this brief excursion into the world 2-way products, we turn our attentionto 3-way products with a repeated factor. First, we look at products of the form
XXY (where X and Y are either 1- or 2-vectors). Applying the associativity ofthe geometric product produces “formula factories”, yielding a wide variety ofimportant geometric identities. Secondly, products of the form aba for 1-vectors a and b are used to develop an elegant representation of euclidean motions in PGAbased on so-called sandwich operators. [Gun17a] contains more about general3-way products in P ( R ∗ , , ). First recall that for a normalized euclidean point or line, X = ±
1. Use this andassociativity to write Y = ± ( XX ) Y = ± X ( XY )32 m P ( c o s ( α )) n α ( - s i n ( α )) n P • • m P • • m • P - ( m • P ) P d ω m P d m P • • m P P - P P : = ( P • m ) m m P • m m • • Figure 10: Orthogonal projections (l. to r.):, line m onto line n , line m ontopoint P , point P onto line m .where Y is also a normalized euclidean 1- or 2-vector. The right-hand side yieldsan orthogonal decomposition of Y in terms of X . Associativity of the geometricproduct shows itself here to be a powerful tool. These decompositions are not onlyuseful in their own right, they provide the basis for a family of other constructions,for example, “the point on a given line closest to a given point”, or “the linethrough a given point parallel to a given line” (see also Table 3).Note that the grade of the two vectors can differ. We work out below threeorthogonal projections. As in the above discussions, we assume the given pointsand lines have been normalized, so their coefficients carry unambiguous metricinformation. Project line onto line.
Assume both lines are euclidean and they theyintersect in a euclidean point. Multiply mn = m · n + m ∧ n with n on the right and use n = 1 to obtain m = ( m · n ) n + ( m ∧ n ) n = (cos α ) n + (sin α ) Pn = (cos α ) n − (sin α ) n ⊥ P In the second line, P is the normalized intersection point of the two lines.Thus one obtains a decomposition of m as the linear combination of n and theperpendicular line n ⊥ P through P . See Fig. 10, left.33 XaXa bbaXab cos ( a b ) . - a b v Figure 11: The reflection in the line a followed by reflection in line b . Exercise.
If the lines are parallel one obtains m = n + d mn ω . Project line onto point.
Multiply mP = m · P + m ∧ P with P on the rightand use P = − m = − ( m · P ) P − ( m ∧ P ) P = − m ⊥ P P − ( d mP I ) P = m || P − d mP ω In the third equation, m || P is the line through P parallel to m , with the sameorientation. Thus one obtains a decomposition of m as the sum of a line through P parallel to m and a multiple of the ideal line. Note that just as adding an idealpoint (“vector”) to a point translates the point, adding an ideal line to a linetranslates the line. See Fig. 10, middle. Project point onto line.
Finally one can project a point P onto a line m .One obtains thereby a decomposition of P as P m , the point on m closest to P ,plus a vector perpendicular to m . See Fig. 10, right.34 .4 Representing isometries as sandwiches Three-way products of the form aba for euclidean 1-vectors a and b turn outto represent the reflection of the line b in the line a , and form the basis for anelegant realization of euclidean motions as sandwich operators. We sketch thishere.Let a and b be normalized 1-vectors representing different lines. Then aba = a ( ba ) = a ( b · a + b ∧ a )= cos( α ) a + a ( b ∧ a )= cos( α ) a + sin( α ) aP = cos( α ) a + sin( α ) a · P = cos( α ) a + sin( α ) a ⊥ P We use the symmetry of the inner product in line 2. In line 3 we replace a ∧ b with the normalized point P and weight sin α . Line 4 is justified by the fact that a ∧ P = 0, and line 5 uses the definition of a ⊥ P . Compare this with the orthogonaldecomposition for b obtained above in Sect. 7.3: b = cos( α ) a − sin( α ) a ⊥ P Using the fact that a ⊥ P is a line perpendicular to a leads to the conclusion that aba must be the reflection of b in a , since the reflection in a is the unique linearmap fixing a and ω and mapping a ⊥ P to − a ⊥ P . ( Exercise
Prove that a ω a = − ω .)We call this the sandwich operator corresponding to a since a appears on bothsides of the expression. It’s not hard to show that for a euclidean point P , aPa isthe reflection of P in the line a . Similar results apply in higher dimensions: thesame sandwich form for a reflection works regardless of the grade of the “meat”of the sandwich.
Rotations and translations.
It is well-known that all isometries of euclideanspace are generated by reflections. The sandwich b ( aXa ) b represents the compo-sition of reflection in line a followed by reflection in line b . See Fig. 11. Whenthe lines meet at angle α , this is well-known to be a rotation around the point Hint: write P = p p where p · p = 0 a ∧ b Angle of two intersecting lines cos − ( a · b )sin − ( (cid:107) a ∧ b (cid:107) )Distance of two || lines (cid:107) a ∧ b (cid:107) ∞ Joining line of two points P ∨ Q ⊥ direction to join of two points P × Q Distance between two points (cid:107) P ∨ Q (cid:107) , (cid:107) P × Q (cid:107) ∞ Oriented distance point to line (cid:107) a ∧ P (cid:107) Angle of ideal point to line sin − ( (cid:107) a ∧ P (cid:107) ∞ )Line through point ⊥ to line P · a Nearest point on line to point ( P · a ) a Line through point || to line ( P · a ) P Oriented area of triangle
ABC ( A ∨ B ∨ C )Length of closed loop P P ... P n Σ ni =1 (cid:107) P i ∨ P i +1 (cid:107) Oriented area of closed loop P P ... P n (cid:107) Σ ni =1 ( P i ∨ P i +1 ) (cid:107) Reflection in line ( X = point or line) aXa Rotation around point of angle 2 α RX (cid:101) R ( R := e α P )Translation by 2 d in direction V ⊥ TX (cid:101) T ( T := 1 + d V )Motor moving line a to a (cid:100) a a Logarithm of motor g cos − ( (cid:104) g (cid:105) ) (cid:100) (cid:104) g (cid:105) Table 3: A sample of geometric constructions and formulas in the euclideanplane using PGA (assuming normalized arguments, all arguments euclidean unlessotherwise stated). 36 through of angle α . R := ab = cos α + sin α P by the above formula. Therotation can be expressed as RX (cid:101) R . (Here, (cid:101) R is the reversal of R , obtained bywriting all products in the reverse order. When R is normalized, it’s also theinverse of R .)When a and b are parallel, R generates the translation in the directionperpendicular to the two lines, of twice the distance between them – once again,PGA polymorphism in action. A product of k euclidean 1-vectors is called a k - versor ; hence the sandwich operator is sometimes called a versor form for theisometry. When R is normalized so that R (cid:101) R = 1, it’s called a motor . A motoris either a rotator (when its fixed point is euclidean) or a translator (when it’sideal). Exponential form for motors.
Motors can be generated directly from thenormalized center point P and angle of rotation α using the exponential form R = e α P = cos α α P . This is another standard technique in geometric algebra: The exponentialbehaves like the exponential of a complex number since, as we noted above, anormalized euclidean point satisfies P = −
1. When P is ideal ( P = 0), the sameprocess yields a translation through distance d perpendicular to the direction of P , by means of the formula T = e d P = 1 + d P . Motor moving one line to another.
Given two lines l and l , there isa unique direct isometry that moves l to l and fixes their intersection point P := l ∧ l . Indeed, we know that when P is euclidean and the angle of intersectionis α , the product g := l l is a motor that rotates by 2 α around the intersectionpoint l ∧ l . Hence the desired motor can be written √ g . ( Exercise.
When g has been normalized to satisfy (cid:107) g (cid:107) = 1, then √ g = (cid:91) g . [Hint: The proof issimilar to that of the statement: Given P = (cos t, sin t ) and Q = (1 ,
0) on theunit circle, P + Q P OQ .]) This resultis true also when P is ideal.This concludes our treatment of the euclidean plane.Table 3 contains anoverview of formulas available in P ( R ∗ , , ), most of which have been introducedin the above discussions. We are not aware of any other frameworks offeringcomparably concise and polymorphic formulas for plane geometry.37 PGA for euclidean space: P ( R ∗ , , ) If you have followed the treatment of plane geometry using PGA, then you arewell-prepared to tackle the 3D version P ( R ∗ , , ). Naturally in 3D one has points,lines, and planes, with the planes taking over the role of lines in 2D (as dualto points); the lines represent a new, middle element not present in 2D. Witha little work one can derive similar results to the ones given above for 2-wayproducts, for orthogonal decompositions, and for isometries. For example, a · b is the angled between two planes a and b . A look at the tables of formulas for3D (Table 4, Table 5) confirms that many of the 2D formulas reappear, withplanes substituting for lines. If you re-read Examples 4.3 and 4.4 now you shouldunderstand much better how 3D isometries are represented in PGA, based onwhat you’ve learned about 2D sandwiches. Notation and foundations.
We continue to use large roman letters for points.Dual to points, planes are now written with small roman letters. Lines (and ingeneral 2-vectors) are written with large Greek letters. Now e is an ideal planeinstead of ideal line, and there are three ideal points E , E and E representingthe x -, y -, and z -directions instead of just three. Bivectors have 6 coordinatescorresponding to the six intersection lines of the four basis planes. The lines e , e , e are ideal lines, and represent the intersections of the 3 euclidean basisplanes with the ideal plane. The lines e , e , e are lines through the origin inthe ( x, y, z )-directions, resp. Hence, every bivector can be trivially written as thesum of an ideal line and a line through the origin.In the interests of space, we leave it to the reader to confirm the similaritiesof the 3D case to the 2D case. We focus our energy for the remainder of thissection on one important difference to 2D: bivectors of P ( R ∗ , , ), which, as wementioned above, have no direct analogy in P ( R ∗ , , ). In P ( R ∗ , , ), all k -vectors are simple , that is, they can be written as the productof k P ( R ∗ , , ). A simple bivector Σ in 3Dis the geometric product of two perpendicular planes Σ = p ∧ p and representstheir intersection line. Then clearly Σ ∧ Σ = 0. Let Σ and Σ be two simple38 peration formula Intersection line of two planes a ∧ b Angle of two intersecting planes cos − ( a · b )sin − ( (cid:107) a ∧ b (cid:107) )Distance of two || planes (cid:107) a ∧ b (cid:107) ∞ Joining line of two points P ∨ Q Intersection point of three planes a ∧ b ∧ c Joining plane of three points P ∨ Q ∨ R Intersection of line and plane Ω ∧ a Joining plane of point and line P ∨ Ω Distance from point to plane (cid:107) a ∧ P (cid:107) Angle of ideal point to plane sin − ( (cid:107) a ∧ P (cid:107) ∞ ) ⊥ line to join of two points P × Q Distance of two points (cid:107) P ∨ Q (cid:107) , (cid:107) P × Q (cid:107) ∞ Line through point ⊥ to plane P · a Project point onto plane ( P · a ) a Project plane onto point ( P · a ) P Plane through line ⊥ to plane Ω · a Project line onto plane ( Ω · a ) a Project plane onto line ( Ω · a ) Ω Plane through point ⊥ to line P · Ω Project point onto line ( P · Ω ) Ω Project line onto point ( P · Ω ) P Line through point ⊥ to line (( P · Ω ) Ω ) ∨ P Oriented volume of tetrahedron
ABCD (cid:107) A ∨ B ∨ C ∨ D (cid:107) Area of triangle mesh M (cid:80) ∆ i ∈ M (cid:107) ˆ P i ∨ ˆ P i ∨ ˆ P i (cid:107) Volume of closed triangle mesh M (cid:107) ( (cid:80) ∆ i ∈ M ˆ P i ∨ ˆ P i ∨ ˆ P i ) (cid:107) ∞ Table 4: A sample of geometric constructions and formulas in 3D using PGA(assuming normalized arguments). 39 peration formula
Common normal line to Ω , Ω (cid:92) Ω × Ω Angle α between Ω , Ω α = cos − ( ˆ Ω · ˆ Ω )Distance between Ω , Ω d Ω Ω = csc α ( ˆ Ω ∨ ˆ Ω )Refl. in plane ( X = pt, ln, or pl) aXa Rotation with axis Ω by angle 2 α RX (cid:101) R ( R := e α Ω )Translation by 2 d in direction V TX (cid:101) T ( T := ( E ∨ d V ) I )Screw with axis Ω and pitch p SX (cid:101) S ( S := e t (1+ p I ) Ω )Logarithm of motor m b = (cid:104) m (cid:105) , s = √− b · b , p = − b ∧ b s (cid:98) b = s − ps b log m = (cid:0) tan − ( s (cid:104) m (cid:105) ) + p (cid:104) m (cid:105) (cid:1)(cid:98) b Table 5: More formulas in 3D using PGA focused on motors and bivectors.bivectors that represent skew lines . We claim that the bivector sum Σ := Σ + Σ is a non-simple. First note that since Σ and Σ are skew, they are linearlyindependent, implying Σ ∧ Σ (cid:54) = 0. Then, using bilinearity and symmetry of thewedge product (on bivectors!), one obtains directly Σ ∧ Σ = 2 Σ ∧ Σ (cid:54) = 0. Wesaw above however that a simple 2-vector Σ satisfies Σ ∧ Σ = 0. Hence Σ mustbe non-simple. In fact, as the next section shows, most bivectors are non-simple. Exponentials of simple bivectors.
In the sequel we will need to know theexponential of a simple bivector. The situation is exactly analogous to the 2D casehandled above and yields: For a simple euclidean bivector Ω , e α Ω = cos α +sin α Ω .For a simple ideal bivector Ω ∞ , e d Ω ∞ = 1 + d Ω ∞ . As noted above, the space of bivectors (cid:86) is spanned by the 6 basis elements e ij := e i e j and forms a 5-dimensional projective space P ( (cid:86) ). From the abovediscussion we can see the condition that a bivector Ω is a line can be writtenas Ω ∧ Ω = 0. (In terms of coordinates, the bivector Σ a ij e ij is a line ⇐⇒ a a + a a + a a = 0.) This defines the Pl¨ucker quadric L , a 4D quadric Skew lines are lines that do not intersect. Remember: parallel lines meet at ideal points andso are not skew. , , P ( (cid:86) ), and giving rise to the well-known Pl¨ucker coordinates for lines. Points not on the quadric are non-simplebivectors, also known as linear line complexes . Consult Figure 12. Linear linecomplexes were first introduced by [M¨ob37] in his early studies of statics underthe name null systems . Here we present an account of the geometric product of two euclidean lines.Justifications for the claims made can be found in the subsequent sections. Letthe two lines be Ω and Σ . Assume they are euclidean and normalized, i.e., Ω ∧ Σ (cid:54) = 0 and Ω = Σ = −
1. Two euclidean lines determine in general a uniquethird euclidean line that is perpendicular to both, call it Π . Consult Fig. 12,right. ΩΣ consists of 3 parts, of grades 0, 2, and 4: ΩΣ = (cid:104) ΩΣ (cid:105) + (cid:104) ΩΣ (cid:105) + (cid:104) ΩΣ (cid:105) = Ω · Σ + Ω × Σ + Ω ∧ Σ = cos α + (sin α Π + d cos α Π ⊥ ) + d sin α I α is the angle between Ω and Σ , viewed along the common normal Π ; d is thedistance between the two lines measured along Π (0 when the lines intersect). d sin α is the volume of a tetrahedron determined by unit length segments on Ω and Σ . Finally, Ω × Σ is a weighted sum of Π and Π ⊥ . The appearance of Π ⊥ is not so surprising, as it is also a “common normal” to Ω and Σ , but as an idealline, is easily overlooked.Does ΩΣ have a geometric meaning? Consider sandwich operators withbivectors, that is, products of the form ΩX (cid:101) Ω for simple euclidean Ω . Such aproduct is called a turn since it is a half-turn around the axis Ω (see below, Sect.8.1.5). And, in turn, the turns generate the full group E + (3) of direct euclideanisometries ( [Stu91]. A little reflection shows that the composition of the twoturns ΩΣ will be a screw motion that rotates around the common normal Π by 2 α while translating by 2 d in the direction from Σ to Ω (the translation isa “rotation” around Π ⊥ ). This is analogous to the product of two reflectionsmeeting at angle α discussed above in Sect. 7.4.Analogous to the 2D case, we can easily calculate the motor that carries Σ Σ Σ = Σ Σ + = RP d α Π ΩΣ Π
Figure 12:
Left:
The space of lines sits inside the space of 2-vectors as a quadricsurface L . Right : Product of two skew lines Ω and Σ involving the commonnormals Π (euclidean) and Π ⊥ (ideal).exactly onto Ω . This is given by √ ΩΣ = (cid:92) (cid:32) ΩΣ (cid:33) . The case of two intersecting lines.
If the two lines are not skew, they havea common point and a common plane and are linearly dependent: Ω ∧ Σ = 0.The common plane is given by ( Ω ∧ e ) ∨ Σ ; the common point P by P =(( Π ∧ e ) ∨ Ω ) ∧ Σ where Π = (cid:104) ΩΣ (cid:105) is the common normal.We turn now to a rather detailed discussion of the structure and behavior ofnon-simple bivectors. Readers with limited time and interest in such a treatmentare encouraged to skip ahead to Sect. 9. In 2D we used the following formula to normalize a 1- or 2-vector: (cid:98) X = X (cid:112) | X | This was made easy since X in all cases was a real number. A non-simpleeuclidean bivector satisfies Θ = Θ · Θ + Θ ∧ Θ = s + p I with s, p (cid:54) = 0. Since it’seuclidean, s <
0. We saw above in Sect. 8.1 that p (cid:54) = 0 ⇐⇒ Θ is non-simple.A number of the form s + p I for s, t ∈ R is called a dual number. If we want to42ormalize a bivector using a formula like the one above, then we have to be ableto find the square root of dual numbers.For a dual number d = s + p I , s > , p (cid:54) = 0, define the square root (cid:112) s + p I = √ s + p √ s I and verify that it deserves the name. Define (cid:107) Θ (cid:107) = u + v I := (cid:112) − ( Θ · Θ + Θ ∧ Θ )Then (cid:98) Θ := (cid:107) Θ (cid:107) − Θ and (cid:98) Θ = −
1. We write Θ in terms of (cid:98) Θ : Θ = (cid:107) Θ (cid:107) (cid:98) Θ = ( u + v I ) (cid:98) Θ = u (cid:98) Θ + v (cid:98) Θ ⊥ That is, we have decomposed the non-simple bivector as the sum of a euclideanline (cid:98) Θ and its orthogonal line (cid:98) Θ ⊥ . It is easy to verify that (cid:98) Θ × (cid:98) Θ ⊥ = 0 so thatthe two bivectors commute. We now apply this to computing the exponential ofa bivector that we need below in Sect. 8.1.6. Remarks on the axis pair.
Note that (cid:98) Θ is not a normalized vector in thetraditional sense since it is no longer projectively equivalent to the original bivector.Indeed, it arises by multiplying the latter by a dual number, not a real number.The euclidean axis has a special geometric significance that will prove to be veryuseful in the analysis of motors that follows. Terminology.
We call (cid:98) Θ the euclidean axis and (cid:98) Θ ⊥ the ideal axis of thenon-simple bivector Θ . Together they form the axis pair of the bivector. Theeuclidean axis however is primary since the ideal axis can be obtained from it bypolarizing: (cid:98) ΘI , but not vice-versa. The existence of an axis pair for an non-simple bivector is the key to understandingits exponential. Applying the decomposition of Θ = u (cid:98) Θ + v (cid:98) Θ ⊥ as an axis pair Θ ⊥ can be thought of as the ideal line consisting of all the directions perpendicular to Θ .For example, if Θ is vertical, then Θ ⊥ is the horizon line.
43e can write e Θ = e v (cid:98) Θ + v (cid:98) Θ ⊥ Since Θ and Θ ⊥ commute (see above), the exponent of the sum is the product ofthe exponents: e Θ = e u (cid:98) Θ + v (cid:98) Θ ⊥ = e u (cid:98) Θ e v (cid:98) Θ ⊥ = e v (cid:98) Θ ⊥ e u (cid:98) Θ where the third equality also follows from commutivity. We can then apply whatwe know about the exponential of simple bivectors from Sect. 8.1 to obtain: e Θ = (cos u + sin u (cid:98) Θ )(1 + v (cid:98) ΘI ) (1)= cos u + sin u (cid:98) Θ + v cos u (cid:98) ΘI − v sin u I (2)= (cos u − v sin u I ) + (sin u + v cos u I ) (cid:98) Θ (3)We will apply this formula below when we compute the logarithm of a motor m . We saw in the discussion of 2D PGA thatbivectors (points) play an important role in implementing euclidean motions:every rotation (translation) can be implemented by exponentiating a euclidean(ideal) point to obtain a motor. This was a consequence of the fact that sandwicheswith 1-vectors (lines) implement reflections and even compositions of reflectionsgenerate all direct isometries. The same stays true in 3D: a sandwich with aplane (1-vector) implements the reflection in that plane. Composing two suchreflections generates a direct motion (rotation/translation around the intersectionline) that is represented by a 3D motor, completely analogous to the 2D case.Using the formula for the exponential of a simple bivector from Sect. 8.1, wederive the formulas for the rotator around a simple euclidean bivector Ω by angle α : e α Ω = cos α + sin α Ω . The translator e d Ω ∞ = 1 + d Ω ∞ produces a translationof length d perpendicular to the ideal line Ω ∞ . Non-simple bivectors, screw motions.
But there are other possibilities in3D for direct motions than just rotations and translations. The generic motion isa screw motion that composes a rotation around a 3D line, called its axis , with atranslation in the direction of the line. To be precise, the axis of a screw motion44 *+ a+bI Λ bivectors R M * D Figure 13: Venn diagram showing the inclusion relationships of the algebra P ( R ∗ , , ), its even subalgebra P ( R ∗ +3 , , ), the dual numbers D , the motor group M , , , and the bivectors (cid:86) .is the unique euclidean line fixed by the screw motion. The motion is furthercharacterized by its pitch , which is the ratio of the angle turned (in radians) tothe distance translated. Every direct isometry is the result of composing an even number of reflections:hence such a motor lies in the even sub-subalgebra, consisting of elements of evengrade and written P ( R ∗ +3 , , ). An element m of the even sub-algebra is a motorif it satisfies m (cid:101) m = 1; such elements form a group, written M , , ⊂ P ( R ∗ +3 , , )called the motor group . The motor group is more generally called the Spin groupof the geometric algebra. It’s a 2:1 cover of the direct Euclidean group E + (3)since m and − m yield the same isometry. Elements of the form e Ω , Ω ∈ (cid:86) arein M , , since (cid:102) e Ω = e (cid:101) Ω = e − Ω and e Ω e − Ω = 1. Fig. 13 illustrates the variousinclusions involved among the algebra, the even algebra, the motor group, thedual numbers, and the bivectors. For example, a normalized simple bivector isalso a motor: used as a sandwich, it produces a rotation of π radians around theline it represents. 45 alculating the logarithm of a motor. The logarithm Θ of a motor m is an algebra element that satisfies m = e Θ . We now show how to find such alogarithm. We know the normalized motor m contains only even-grade parts: m = (cid:104) m (cid:105) + (cid:104) m (cid:105) + (cid:104) m (cid:105) (4)= s + Θ + p I (5)= ( s + p I ) + ( s + p I ) (cid:98) Θ (6)In the last line we have substituted Θ = (cid:107) Θ (cid:107) (cid:98) Θ (see above Sect. 8.1.3). Comparingcoefficients in Eq. 3 and Eq. 6 we see that we have an overdetermined system:from the four quantities { s , p , s , p } we have to deduce the two parameters { u, v } . This leads to the following values for u and v : u := tan − ( s , s ) , v := p s for s (cid:54) = 0 (7) u := tan − ( − p , p ) , v := − p s otherwise (8)Note that either s (cid:54) = 0 or s (cid:54) = 0 since otherwise m = 0. Then e ( u + v I ) (cid:98) Θ = m ( u + v I ) (cid:98) Θ is the logarithm of m . It is unique except for adding multiples of 2 π to u . The pitch of the screw motion is given by the proportion v : u . The logarithmshows that m can be decomposed as e u (cid:98) Θ e v (cid:98) Θ ⊥ that is, the composition (in either order) of a rotation through angle 2 u aroundthe axis (cid:98) Θ and a translation of distance 2 v around the polar axis (cid:98) Θ ⊥ . Axis of bivector or axis of screw motion?
These formulas make clear thatthe two uses of axis that we have encountered are actually the same. The axispair of a screw motion (considered as the unique pair of invariant lines) is theaxis pair of its bivector part. Connection to Lie groups and Lie algebras.
By establishing the logarithm46unction (unique up to multiples of 2 π ), we have established that the exponentialmap exp : (cid:86) → M , , is invertible. Hence we are justified in identifying M , , as a Lie group and (cid:86) as its Lie algebra, and can apply the well-developed Lietheory to this aspect of PGA.This concludes our introductory treatment of the geometric product in P ( R ∗ , , ) . We turn now to its formulation of rigid body mechanics, whoseessential features were already known to Pl¨ucker and Klein in terms of 3D linegeometry ( [Zie85]). ( R ∗ , , ) Here we give a very abbreviated overview of the treatment of kinematics and rigidbody mechanics in PGA in the form of a bullet list.1. Kinematics deal with continuous motions in E , that is, paths in M , , .Let g ( t ) be such a path describing the motion of a rigid body.2. There are two coordinate systems for a body moving with g : body and space.An entity x can be represented in either: X c / X s represents body/spaceframe.3. The velocity in the body Ω c := (cid:101) g ˙ g ; in space, Ω s := ˙ g (cid:101) g . Ω c and Ω s arebivectors.4. A , the inertia tensor of the body, is a 6D symmetric bilinear form J − ( A ( Ω c )) = Π c and Ω c = A − ( J ( Π c ))where Π c is the momentum in the body and J is Poincar´e duality map.
5. The kinetic energy E satisfies E = Ω c ∧ Π c .6. Let Φ c represent the external forces in body frame. Then ˙ E = − Φ c ∨ Ω c .7. The work done can be computed as w ( t ) = E ( t ) − E (0) = (cid:90) t ˙ Eds = − (cid:90) t Φ c ∨ Ω c ds
8. The Euler equations of motion for the of the motion free top one obtains A actually maps to the dual exterior algebra: A : (cid:86) → (cid:86) ∗ , we compose it with the dualitymap J to bring the result back to P ( R ∗ , , ). g = gΩ c (9)˙ Ω c = A − ( Φ c + 2 A ( Ω c ) × Ω c ) (10) Theoretical discussion.
The traditional separation of both velocities andmomenta into linear and angular parts disappears completely in PGA, furtherevidence of its polymorphicity. The special, awkward role assigned to the coor-dinate origin in the calculation of angular quantities (moment of a force, etc.)along with many mysterious cross-products likewise disappear.What remains are unified velocity and momentum bivectors that representgeometric entities with intuitive significance. We have already above seen howthe velocity can be decomposed into an axis pair that completely describes theinstantaneous motion at time t . Similar remarks are valid also for momentumand force bivectors. We focus on forces now but everything we say also applies tomomenta. The simple bivector representing a simple force is the line carrying theforce; the weight of the bivector is the intensity of the force. A force couple isa simple force carried by an ideal line (like a translation is a “rotation” aroundan ideal line). Systems of forces that do not reduce to a simple bivector can bedecomposed into an axis pair exactly as the velocity bivector above, combining asimple force with an orthogonal force couple. This axis pair has to be interpretedhowever in a dynamical, not kinematical, setting. Further discussion lies outsidethe scope of these notes. Practical discussion.
The above Euler equations equations behave particularlywell numerically: the solution space has 12 dimensions (the isometry group is6D and the momentum space (bivectors) also) while the integration space has14 dimensions ( P ( R ∗ +3 , , ) has dimension 8 and the space of bivectors has 6).Normalizing the computed motor g brings one directly back to the solution space.In traditional matrix approaches as well as the CGA approach ( [LLD11]), theco-dimension of the solution space within the integration space is much higherand leads typically to the use Lagrange multipliers or similar methods to maintainaccuracy. This advantage over VLAAG and CGA is typical of the PGA approachfor many related computing challenges.See [Gun11b] or [Gun11a], Ch. 9, for details on rigid body mechanics in48 ( R ∗ , , ). For a compact, playable PGA implementation see [Ken17a]. [HS87] introduces the term “geometric calculus” for the application of calculus togeometric algebras, and shows that it offers an attractive unifying framework inwhich many diverse results of calculus and differential geometry can be integrated.While a treatment of geometric calculus lies outside the scope of these notes,we want to present a related result to give a flavor of what is possible in thisdirection.We have already met above, in Sect. 8.1.3, the 2-dimensional sub-algebra of P ( R ∗ n, , ) consisting of scalars and pseudoscalars known as the dual numbers. Itcan be abstractly characterized by the fact that 1 = 1 while I = 0. AlreadyEduard Study, the inventor of dual numbers, realized that they can be used to doautomatic differentiation ( [Stu03], Part II, § p k ( x ) = x k , define p k ( x + y I ) := ( x + y I ) k = x k + nx n − y I All higher terms disappear since I = 0. Setting y = 1 we obtain p k ( x + I ) = p k ( x ) + ˙ p k ( x ) I That is, the scalar part is the original polynomial and the pseudoscalar, or dual,part is its derivative. In general if u is a function u ( x ) with derivative ˙ u , then p k ( u + ˙ u I ) = p k ( u ) + ˙ p k ( u ) I I tracks the derivative of p k . Extend these definitions topolynomials by additivity in the obvious way. Since the polynomials are dense inthe analytic functions, the same “dualization” can be extended to them and oneobtains in this way robust, exact automatic differentiation. One can also handlemultivariable functions of n variables, using the ( n ) ideal n − vectors E i for i > n -space) as the nilpotent elementsinstead of I . For a live JavaScript demo see [Ken17a].
10 Implementation issues
Our description would be incomplete without discussion of the practical issuesof implementation. This has been the focus of much work and there exists awell-developed theory and practice for general geometric algebra implementationsto maintain performance parity with traditional approaches. See [Hil13]. PGApresents no special challenges in this regard; in fact, it demonstrates clear ad-vantages over other geometric algebra approaches to euclidean geometry in thisregard ( [Gun17b]). For a full implementation of PGA in JavaScript ES6 seeSteven De Keninck’s ganja.js project on GitHub [Ken17b] and the interactiveexample set at [Ken17a].
11 Comparison
Table 6 encapsulates the foregoing results in a feature-by-feature comparison withthe standard (VLAAG) approach. It establishes that PGA fulfills all the featureson our wish-list in Sec. 2, while the standard approach offers almost none of them.(For a proof that PGA is coordinate-free, see the Appendix in [Gun17a].)
How can we characterize conceptually the difference of the two approaches leadingto such divergent results? • First and foremost: VLAAG is point-centric : other geometric primitivesof VLAAG such as lines and planes are built up out of points and vectors.PGA on the other hand is primitive-neutral : the exterior algebra(s) at its50
GA VLAAG
Unified representation for points, lines,and planes based on a graded exterioralgebra; all are “equal citizens” in thealgebra. The basic primitives are points and vec-tors and all other primitives are builtup from these. For example, lines in3D sometimes parametric, sometimes w/Pl¨ucker coordinates.Projective exterior algebra provides ro-bust meet and join operators that dealcorrectly with parallel entities. Meet and join operators only possiblewhen homogeneous coordinates are used,even then tend to be ad hoc since pointshave distinguished role and ideal ele-ments rarely integrated.Unified, high-level treatment of eu-clidean (“finite”) and ideal (“infinite”)elements of all dimensions. Unifies e.g.rotations and translations, simple forcesand force couples. Points (euclidean) and vectors (ideal)have their own rules, user must keeptrack of which is which; no higher-dimensional analogues for lines andplanes.Unified representation of isometriesbased on sandwich operators which actuniformly on points, lines, and planes. Matrix representation for isometries hasdifferent forms for points, lines, andplanes.Same representation for operator andoperand: m is the plane as well as thereflection in the plane. Matrix representation for reflection in m is different from the vector representingthe plane.Compact, universal expressive formulasand constructions based on geometricproduct (see Tables 3, 4, and 5) validfor wide range of argument types anddimensions. Formulas and constructions are ad hoc ,complicated, many special cases, sepa-rate formulas for points/lines/planes, forexample, compare [Gla90].Well-developed theory of implementa-tion optimizations to maintain perfor-mance parity. Highly-optimized libraries, direct map-ping to current GPU design.Automatic differentiation of real-valuedfunctions using dual numbers. Numerical differentiation Table 6: A comparison of PGA with the standard VLAAG approach.51ase provide native support for the subspace lattice of points, lines andplanes (with respect to both join and meet operators). • Secondly, the projective basis of PGA allows it to deal with points andvectors in a unified way: vectors are just ideal points, and in general, theideal elements play a crucial role in PGA to integrate parallelism, whichtypically has to be treated separately in VLAAG. The existence of the idealnorm in PGA goes beyond the purely projective treatment of incidence,producing polymorphic metric formulas that, for example, correctly handletwo intersecting lines whether they intersect or are parallel (see aboveSect. 7.2). • The representation of isometries using sandwich operators generated byreflections in planes (or lines in 2D) can be understood as a special caseof this “compact polymorphicity”: the sandwich operator gX ˜ g works nomatter what X is, the same representation works whether it appears asoperator or as operand, and rotations and translations are handled in thesame way. All these conceptual differences contribute to the astounding richness of the PGAsyntax in comparison to VLAAG, a richness exemplified in the formulas of tables3, 4, and 5. Each of the conceptual differences in the above list can be thoughtof as a set of distinctions that are embedded in a unified form within the PGAsyntax: points/lines/planes, euclidean/ideal, operator/operand, etc. This leads tohaving many more basic expressions for modeling geometry than in VLAAG, andthey all combine meaningfully with each other. To the best of our knowledge theseformula collections establish PGA as the “world champion” among all existingframeworks for euclidean geometry with respect to compactness, completeness,and polymorphicity. Compare [Gla90] for selected VLAAG analogs. Readers whoknow of a competitive formula collection are urged to drop the author an emailwith a pointer to it. We also expect that there are more formulas waiting to bediscovered (after all, here we’ve only considered the 2-way products and a smallsubset of the 3-way products).
Non-euclidean metrics.
The expressiveness of PGA takes on a wider dimen-sion when we recall that PGA is actually a family of geometric algebras. We52 b v Pba abaI P v Q c o s h (- P Q ) . - (Q a ) a . cosh (a b) . - cosh (||c|| ) - c = Q a . ( a b )I v Q Figure 14: Doing geometry in the hyperbolic plane using the PGA P ( R ∗ , , ).have focused attention here on euclidean PGA. The other members of the familymodel non-euclidean spaces, notably, spherical and hyperbolic space. Simplyby specifying a different value for e , these other PGA’s can also be accessed.Many of the formulas and constructions included in these notes can be appliedunchanged to these other metric spaces (for example, the treatment of rigid bodymechanics included above is metric-neutral in this sense, as are many of theconstructions in the tables) or with minor and instructive differences with respectto EPGA. The example of spherical geometry in Sect. 6.3 illustrates the power ofthis approach. [Gun11a] develops all its PGA results in the setting of all threeclassical metrics. The previous section highlighted the structural advantages enjoyed by PGA overVLAAG. We strengthen this argument in this section by showing that alternateapproaches to euclidean geometry are largely present already in PGA as parts ofthe whole. 53
The previous section has already suggested that VLAAG can be seen less as adirect competitor to PGA than as a restricted subset. Indeed, restricting attentionto the vector space of n -vectors (sometimes written (cid:86) n ) in PGA essentially yieldsstandard vector algebra. Define the “points” to be euclidean n -vectors ( P (cid:54) = 0)and “vectors” to be ideal n -vectors ( P = 0). All the rules of vector algebracan be then derived using the vector space structure of (cid:86) n equipped with thestandard and ideal PGA norms (assuming normalized arguments as usual). Theabsence of the geometric product in this context makes clear why VLAAG is somuch “smaller” than PGA. Unified R n and E n . This embedding of vector algebra in PGA also comeswith a nice geometric intuition absent in traditional vector algebra: the vectorsmake up the ideal plane bounding the euclidean space of points, i. e. , points andvectors make up a connected, unified space (topologically equivalent to projectivespace R P n ). Furthermore, intuitions developed in vector algebra such as “Addinga vector to a point translates the point.” have natural extensions in PGA: addingan ideal line (plane) to a euclidean line (plane) translates the line (plane) parallelto itself . Such patterns are legion. Note that PGA is fully compatible with the use of linear algebra. A linear mapon the 1-vectors has induces linear maps on all grades of the algebra that can beautomatically computed and applied. The big difference to VLAAG is that linearalgebra no longer is needed to implement euclidean motions – a role for whichit is not particularly well-suited. We envision the development of an analyticgeometry based on the full extent of PGA, not just on the small subset present inVLAAG, and would have at its disposal the geometric calculus sketched in Sect. 9.Traditional analytic geometry would make up a small subset of this extendedanalytic geometry, like vector algebra makes up a small part of PGA proper. Whereby the two lines must be co-planar. The underlying graded algebra structure of PGA can be thought of as beinginherited from the exterior algebra. The wedge product is just the highest gradepart of the geometric product, and implements the meet operator in PGA. Thejoin operator is available from the dual exterior algebra via Poincar´e duality (seeSect. 5.10).
Many aspects of PGA are present in embryonic form in quaternions and dualquaternions, but they only find their full expression and utility when embeddedin the full algebra PGA. Indeed, the quaternion and dual quaternion algebras areisomorphically embedded in the even sub-algebra P ( R ∗ + n, , ) for n ≥ Integrated with points and planes.
The advantage of the embedding inPGA are considerable. The full algebraic structure of PGA provides a muchricher environment than these quaternion algebras alone. At the most basic level,quaternion and dual quaternion sandwich operators only model direct isometries;the embedding in PGA reveals how they arise naturally as even compositionsof the reflections provided by sandwiches with 1-vectors. Furthermore, few ofthe formulas in Tables 3, 4, and 5 are available in the quaternion algebras alonesince the latter only have natural representations for primitives of even grade(essentially bivectors for n = 2 and n = 3). For example, in PGA, you canapply all sandwiches to geometric primitives of any grade. In contrast, one of the“mysteries” of contemporary dual quaternion usage is that there are separate adhoc representations for points, lines, and planes and slightly different forms of thesandwich operator for each in order to be able to apply euclidean direct isometries.These eccentricities disappear when, as in PGA, there are native representationsfor points and planes, see [Gun17b], § Demystifying (cid:15) and the legacy of William Clifford.
The PGA embeddingclears up other otherwise mysterious aspects of current dual quaternion practice.Consider the dual unit (cid:15) satisfying (cid:15) = 0. In the embedding map, it maps to thepseudoscalar I of the algebra (for details see [Gun11a], §
12 Conclusion
We have established that euclidean PGA fulfills the developers’ wish list withwhich we began these notes, offering numerous advantages over the existingVLAAG approach. The natural next question for interested developers is, whatis involved in migrating to PGA from one of the alternatives discussed above?In fact, the use of homogeneous coordinates and the inclusion of quaternions,dual quaternions, and exterior algebra in PGA means that many practitionersalready familiar with these tools can expect a gentle learning curve. Furthermore,the availability of a JavaScript implementation on GitHub ( [Ken17b]) and theexistence of platforms such as Observable notebooks [Bos18] means that interestedusers, equipped with the attached “cheat sheets” for 2D and 3D PGA, can quicklyget to work to prototype and share their applications. Readers who would liketo deepen their understanding of the underlying mathematics are referred to theliterature [Gun11c], [Gun11a], [Gun17b], [Gun17a]. We intend also to establish anon-line presence for PGA that will facilitate the exchange of information amongthe community of users, that we will announce at the course meeting in LosAngeles in July 2019.
Acknowledgements
Thanks to Steven De Keninck for ganja.js , stimulating conversations andhelpful feedback during the preparation of these notes.
References [Bos18] Mike Bostock. Observable notebooks: a reactive JavaScript environ-ment, 2018. https://observablehq.com.56Cli73] William Clifford. A preliminary sketch of biquaternions.
Proc. LondonMath. Soc. , 4:381–395, 1873.[Cli78] William Clifford. Applications of Grassmann’s extensive algebra.
Amer-ican Journal of Mathematics , 1(4):pp. 350–358, 1878.[Gla90] Andrew S. Glassner. Useful 3d geometry. In Andrew S. Glassner, editor,
Graphics Gems , pages 297–300. Academic Press, 1990.[Gra44] Hermann Grassmann.
Ausdehnungslehre . Otto Wigand, Leipzig, 1844.[Gun11a] Charles Gunn.
Geometry, Kinematics, and Rigid Body Mechanics inCayley-Klein Geometries . PhD thesis, Technical University Berlin, 2011. http://opus.kobv.de/tuberlin/volltexte/2011/3322 .[Gun11b] Charles Gunn. On the homogeneous model of euclidean geometry. InLeo Dorst and Joan Lasenby, editors,
A Guide to Geometric Algebrain Practice , chapter 15, pages 297–327. Springer, 2011.[Gun11c] Charles Gunn. On the homogeneous model of euclidean geometry:Extended version. http://arxiv.org/abs/1101.4542 , 2011.[Gun17a] Charles Gunn. Doing euclidean plane geometry using projective geo-metric algebra.
Advances in Applied Clifford Algebras , 27(2):1203–1232,2017. http://arxiv.org/abs/1501.06511 .[Gun17b] Charles Gunn. Geometric algebras for euclidean geometry.
Advances inApplied Clifford Algebras , 27(1):185–208, 2017. http://arxiv.org/abs/1411.6502 .[Hil13] Dieter Hildebrand.
Fundamentals of Geometric Algebra Computing .Springer, 2013.[HS87] David Hestenes and Garret Sobczyk.
Clifford Algebra to GeometricCalculus . Fundamental Theories of Physics. Reidel, Dordrecht, 1987.[Ken17a] Steven De Keninck. Ganja coffeeshop, 2017.https://enkimute.github.io/ganja.js/examples.[Ken17b] Steven De Keninck. Ganja: Geometric algebra for javascript, 2017.https://github.com/enkimute/ganja.js.57LLD11] Anthony Lasenby, Robert Lasenby, and Chris Doran. Rigid bodydynamics and conformal geometric algebra. In Leo Dorst and JoanLasenby, editors,
Guide to Geometric Algebra in Practice , chapter 1,pages 3–25. Springer, 2011.[M¨ob37] A. F. M¨obius.
Lehrbuch der Statik . G¨oschen, Leibzig, 1837.[Stu91] Eduard Study. Von den Bewegungen und Umlegungen.
MathematischeAnnalen , 39:441–566, 1891.[Stu03] Eduard Study.
Geometrie der Dynamen . Tuebner, Leibzig, 1903.[Wik] Wikipedia. https://en.wikipedia.org/wiki/Automatic_differentiation .[Zie85] Renatus Ziegler.