23
Geometric Algebra Geometric Algebra Vitor Fernando Pamplona

Geometric algebra-1224338640583032-8

Embed Size (px)

DESCRIPTION

Geo

Citation preview

Page 1: Geometric algebra-1224338640583032-8

Geometric AlgebraGeometric Algebra

Vitor Fernando Pamplona

Page 2: Geometric algebra-1224338640583032-8

Cross Product in nD?Cross Product in nD?

• Why not?Why not? – V1 = (1.0, 2.0, 3.0, 4.0)V1 = (1.0, 2.0, 3.0, 4.0)– V2 = (-2.0, -3.0, -4.0, -5.0)V2 = (-2.0, -3.0, -4.0, -5.0)

I J K Q1,00 2,00 3,00 4,00-2,00 -3,00 -4,00 -5,00

= = ??????

V1×V2=??

Page 3: Geometric algebra-1224338640583032-8

A language for geometry A language for geometry

GeometricConcepts

AlgebraicLanguage

• Magnitude Magnitude - size- size

• Direction Direction -orientation-orientation

• Sense Sense - negative/positive- negative/positive

3D

35ºx

4,20

CCW• Grade Grade - dimension- dimension

Page 4: Geometric algebra-1224338640583032-8

What we need?What we need?

• n-dimensionaln-dimensional geometric language geometric language

• RepresentRepresent the the object gradeobject grade

• OperateOperate acrossacross different dimensionsdifferent dimensions

• GeometricallyGeometrically intuitive intuitive

• Without Without limitslimits

• Coordinate Coordinate freefree

• EfficientEfficient

• Unify Unify other algebrasother algebras

Page 5: Geometric algebra-1224338640583032-8

Product of Vectors ?Product of Vectors ?

v=3e12e2

vv= 3 e12 e2∗3 e1 2 e2

vv= ?

vv= 9 e1 e1 6 e1 e26 e2 e14 e2 e2

e1 e1= ?e1 e2= ?e2 e1= ?e2 e2= ?

v=3,2

e1

e2

v

Page 6: Geometric algebra-1224338640583032-8

Gibbs (Vector Algebra)Gibbs (Vector Algebra)

v=3e12e2

vv= 9 e1 e1 6 e1 e26 e2 e14 e2 e2

v=3,2

{ ei⋅e j=1 i= jei⋅e j= e j⋅ei=0 i≠ j

vv= 9 4=13

v⋅v= 3,2∗3,2v⋅v=3∗32∗2

v⋅v=13

dot productdot product

e1

e2

v

Page 7: Geometric algebra-1224338640583032-8

Clifford (Geometric Algebra)Clifford (Geometric Algebra)

{ ei⋅e j=1 i= jei⋅e j e j⋅ei=0 i≠ j

v=3e12e2

e1

e2

v

vv= 9 e1 e1 6 e1 e26 e2 e14 e2 e2

v=3,2

vv= 9 4=13

ei⋅e j=−e j⋅ei

vv= 9 e1 e1 6 e1 e2−6 e1 e24 e2 e2

AnticomutivityAnticomutivity

Inner productInner product

Page 8: Geometric algebra-1224338640583032-8

The Goal: Outer Product The Goal: Outer Product • What's What's e1e2e1e2 ? ?

– It isn't a scalarIt isn't a scalar

– It isn't a vectorIt isn't a vector

• It's a It's a planeplane, a , a vector spacevector space (blade) (blade)

• CalledCalled Bivector Bivector or 2-vector or 2-vector

• Outer products Outer products spanspan

e1

e2

O

e1

e2

CCW2D

O

e1∧e2

e2∧e1

Page 9: Geometric algebra-1224338640583032-8

Inner product (dot)Inner product (dot)• Outer productOuter product spans spans

• Inner product Inner product projectsprojects

1 e1 ∧ 2 e2 = 1∗2 e1 e2

12 e1 e2 ⋅ e2 = 12 e1

vv= 9 4=13

vv= 9 e1 e1 6 e1 e2−6 e1 e24 e2 e2

e1

e2

v

Page 10: Geometric algebra-1224338640583032-8

Geometric ProductGeometric Product

vu =v ⋅uv ∧u

Inner productInner product Outer productOuter product

v ∥u v ∧ u = 0v ⊥u v ⋅ u = 0

vv =9 4=13

vv =9 e1 e16 e1 e 2−6 e1 e 24 e 2 e 2

e1

e2

v

{ e i⋅e j =1 i = j e i⋅e j e j⋅e i =0 i ≠ j

Page 11: Geometric algebra-1224338640583032-8

Contraction Inner Product Contraction Inner Product • GeneralizesGeneralizes inner product to Blades inner product to Blades

• Complement of the orthogonal projectionComplement of the orthogonal projection

• Generalizing Generalizing geometric productgeometric product

BB

a B a B =

aa

a Ba B

vu= v u v ∧ u

Page 12: Geometric algebra-1224338640583032-8

History of Geometric AlgebraHistory of Geometric AlgebraSynthetic GeometrySynthetic Geometry

EuclidEuclid

Analitic GeometricAnalitic GeometricDescartesDescartes

Complex ÁlgebraComplex ÁlgebraWessel, GaussWessel, Gauss

QuaternionsQuaternionsHamiltonHamilton

Matrix ÁlgebraMatrix ÁlgebraCayleyCayley

DeterminantsDeterminantsSylvesterSylvester

Vector AlgebraVector AlgebraGibbsGibbs

Exterior AlgebraExterior AlgebraGrassmanGrassman

Clifford AlgebraClifford AlgebraCliffordClifford

Differential FormsDifferential FormsE. CartanE. CartanSpin AlgebraSpin Algebra

Pauli, DiracPauli, Dirac

Tensor AlgebraTensor AlgebraRicciRicci

Geometric AlgebraGeometric Algebra

300 BC

1637

1798

1854

1878

1928

18431844

18781881

1890 1923

Page 13: Geometric algebra-1224338640583032-8

MultivectorMultivector• UniqueUnique structure structure

• Outer product Outer product spans spans

• Inner product Inner product projectsprojects

v ℜ 3= e 1 e 2 e 3

e 1 e 2 e 1 e 3 e 2 e 3

e 1 e 2 e 3

ScalarScalarVectorsVectors2-Blades2-Blades3-Blades3-Blades

Page 14: Geometric algebra-1224338640583032-8

Operations on MultivectorsOperations on Multivectors• Graduated InvolutionGraduated Involution

• ReverseReverse

• ConjugationConjugation

• InverseInverse

v k =−1k ∗v k

v k =−1k k −1 /2∗v k vu =uv

v k =v = v

v −1=v

∣v∣ ²

Page 15: Geometric algebra-1224338640583032-8

Operations on Multivectors (cont)Operations on Multivectors (cont)• Angle Angle between vectorsbetween vectors

• PseudoscalarPseudoscalar– Dimensional limitDimensional limit

• DualDual

cos = v⋅u∣v∣∣u∣

A=Ã k∗ps

psℜ3=1∗e1∧e2∧e3

Page 16: Geometric algebra-1224338640583032-8

Operations on Multivectors (cont 2)Operations on Multivectors (cont 2)• Meet Meet

• Join Join

• Sum and difference Sum and difference

• NablaNabla = Symmetric difference = Symmetric difference

C=A∩B

C=A∪B

v1∇ v2=majorGrade v1∗v2

C=AB C=A−B

Page 17: Geometric algebra-1224338640583032-8

Future Readings Future Readings [Dorst,[Dorst, 02a 02a] [Vaz,] [Vaz, 97 97]]

• Projection of blades and Projection of blades and Rejection Rejection

• Reflection Reflection

• Rotors Rotors

• Models Models – HomogeneousHomogeneous model / Plücker coordinates model / Plücker coordinates– ConformalConformal model model

• Quaternions Quaternions

Page 18: Geometric algebra-1224338640583032-8

GA FrameworksGA Frameworks• GAViewerGAViewer: Geometric algebra computations and visualize: Geometric algebra computations and visualize

• GAPGAP: Geometric Algebra Package: Geometric Algebra Package [[Zaharia, 03Zaharia, 03] ]

• GAIGEN: Code generator to Geometric Algebra GAIGEN: Code generator to Geometric Algebra [[FontijneFontijne]]

• GluCat:GluCat: template classes to Clifford algebrastemplate classes to Clifford algebras

• GAGL: GAGL: Geometric Algebra to OpenGLGeometric Algebra to OpenGL

• GEOMA: C++ Template Classes for Geometric AlgebrasGEOMA: C++ Template Classes for Geometric Algebras

Page 19: Geometric algebra-1224338640583032-8

Multivector ImplementationsMultivector Implementations• GAGLGAGL

– Vector[8]Vector[8]– Only in 3D.Only in 3D.

• GEOMAGEOMA– Matrix [2Matrix [2kk][2][2kk]] where k = gradewhere k = grade

• GluCat: GluCat: ????

• GAPGAP

scalar , e1 , e2 , e3 ,e1∧e2 , e1∧e3 , e2∧e3 ,

e1∧e2∧e3

scalar , e1 , e2 , e3 , e1∧e2 , e1∧e3 , e2∧e3 , e1∧e2∧e3

HMV HMV HMV

EBLADE EBLADE EBLADE

Page 20: Geometric algebra-1224338640583032-8

Clean Multivector ImplementationClean Multivector Implementation• Think OOThink OO with low memory usage with low memory usage

• Two ClassesTwo Classes– GAMultivectorGAMultivector– GASpaceGASpace

• Inside GAMultivectorInside GAMultivector– double[length]: where length is a double[length]: where length is a compile timecompile time method method

length=1∑k=1

n

C n , k

Page 21: Geometric algebra-1224338640583032-8

Performance AspectsPerformance Aspects

Model Implem. Full Rend Time (s) Memory (MB)3DLA Standard 1,00 6,23DGA Gaigen 2,56 6,74DLA Standard 1,05 6,44DGA Gaigen 2,97 7,75DGA Gaigen 5,71 9,9

• Raytracer Raytracer benchmarkbenchmark

• 3DLA: Linear Algebra3DLA: Linear Algebra• 3DGA: Geometric Algebra3DGA: Geometric Algebra• 4DLA: Homogeneous coordinates4DLA: Homogeneous coordinates• 4DGA: Homogeneous model4DGA: Homogeneous model• 5DGA: Conformal model5DGA: Conformal model

FASTFAST

ELEGANCEELEGANCE

(Fontijne, D. & Dorst,2003)

Page 22: Geometric algebra-1224338640583032-8

So...So...

“ “... that it provides a single, simple mathematical framework ... that it provides a single, simple mathematical framework

which eliminates the plethora of diverse mathematical which eliminates the plethora of diverse mathematical

descriptions and techniques...”descriptions and techniques...”

[McRobie and Lasenby, 1999][McRobie and Lasenby, 1999]

Page 23: Geometric algebra-1224338640583032-8

ReferencesReferences• Dorst, L. & Mann, S. Geometric algebra: a computational framework for geometrical Dorst, L. & Mann, S. Geometric algebra: a computational framework for geometrical

applications (part II: aplications) IEEE Computer Graphics and Applications, 2002, 1applications (part II: aplications) IEEE Computer Graphics and Applications, 2002, 1

• Dorst, L. & Mann, S. Geometric algebra: a computational framework for geometrical Dorst, L. & Mann, S. Geometric algebra: a computational framework for geometrical

applications (part I: algebra) IEEE Computer Graphics and Applications, 2002, 1, 24-31applications (part I: algebra) IEEE Computer Graphics and Applications, 2002, 1, 24-31

• Fontijne, D. & Dorst, L. Modeling 3D Euclidean Geometry IEEE Computer Graphics and Fontijne, D. & Dorst, L. Modeling 3D Euclidean Geometry IEEE Computer Graphics and

Applications, 2003Applications, 2003

• Macdonald, A. A Survey of Geometric Algebra and Geometric Calculus, 2005Macdonald, A. A Survey of Geometric Algebra and Geometric Calculus, 2005

• Vaz, J.J. A álgebra geométrica do espaço euclidiano e a teoria de Pauli Revista Vaz, J.J. A álgebra geométrica do espaço euclidiano e a teoria de Pauli Revista

Brasileira de Ensino de Física, 1997, 19, 234-259Brasileira de Ensino de Física, 1997, 19, 234-259

• Zaharia, M.D. & Dorst, L. The Interface Spec. and Implementation Internals of a Zaharia, M.D. & Dorst, L. The Interface Spec. and Implementation Internals of a

Program Module for Geometric Algebra University of Amsterdam, 2003Program Module for Geometric Algebra University of Amsterdam, 2003