Geometric Algebra A powerful tool for solving geometric problems in - - PowerPoint PPT Presentation

geometric algebra
SMART_READER_LITE
LIVE PREVIEW

Geometric Algebra A powerful tool for solving geometric problems in - - PowerPoint PPT Presentation

Geometric Algebra A powerful tool for solving geometric problems in visual computing Leandro A. F. Fernandes Manuel M. Oliveira laffernandes@inf.ufrgs.br oliveira@inf.ufrgs.br CG UFRGS Geometric problems Geometric data Lines, planes,


slide-1
SLIDE 1

CG UFRGS

Geometric Algebra

A powerful tool for solving geometric problems in visual computing

Leandro A. F. Fernandes

laffernandes@inf.ufrgs.br

Manuel M. Oliveira

  • liveira@inf.ufrgs.br
slide-2
SLIDE 2

Geometric problems

 Geometric data

  • Lines, planes, circles, spheres, etc.

 Transformations

  • Rotation, translation, scaling, etc.

 Other operations

  • Intersection, basis orthogonalization, etc.

 Linear Algebra is the standard framework

2

slide-3
SLIDE 3

Using vectors to encode geometric data

 Directions  Points

3

slide-4
SLIDE 4

Using vectors to encode geometric data

 Directions  Points

4

Drawback

The semantic difference between a direction vector and a point vector is not encoded in the vector type itself.

  • R. N. Goldman (1985), Illicit expressions in vector algebra,

ACM Trans. Graph., vol. 4, no. 3, pp. 223–243.

slide-5
SLIDE 5

Assembling geometric data

 Straight lines

  • Point vector
  • Direction vector

5

slide-6
SLIDE 6

Assembling geometric data

 Straight lines

  • Point vector
  • Direction vector

 Planes

  • Normal vector
  • Distance from origin

6

slide-7
SLIDE 7

Assembling geometric data

 Straight lines

  • Point vector
  • Direction vector

 Planes

  • Normal vector
  • Distance from origin

 Spheres

  • Center point
  • Radius

7

slide-8
SLIDE 8

Assembling geometric data

 Straight lines

  • Point vector
  • Direction vector

 Planes

  • Normal vector
  • Distance from origin

 Spheres

  • Center point
  • Radius

8

Drawback

The factorization of geometric elements prevents their use as computing primitives.

slide-9
SLIDE 9

Intersection of two geometric elements

 A specialized equation for each pair of elements

  • Straight line × Straight line
  • Straight line × Plane
  • Straight line × Sphere
  • Plane × Sphere
  • etc.

 Special cases must be handled explicitly

  • Straight line × Straight line may return
  • Empty set
  • Point
  • Straight line

9

slide-10
SLIDE 10

Intersection of two geometric elements

 A specialized equation for each pair of elements

  • Straight line × Straight line
  • Straight line × Plane
  • Straight line × Sphere
  • Plane × Sphere
  • etc.

 Special cases must be handled explicitly

  • Straight line × Straight line may return
  • Empty set
  • Point
  • Straight line

10

Linear Algebra Extension

Plücker Coordinates

  • An alternative to represent flat geometric elements
  • Points, lines and planes as elementary types
  • Allow the development of more general solution
  • Not fully compatible with transformation matrices
  • J. Stolfi (1991) Oriented projective geometry. Academic Press Professional, Inc.
slide-11
SLIDE 11

Projective Affine Linear

Using matrices to encode transformations

11

Similitude Perspective Rigid / Euclidean Isotropic Scaling Scaling Reflection Shear Translation Identity Rotation

slide-12
SLIDE 12

Drawbacks of transformation matrices

 Non-uniform scaling affects point vectors and

normal vectors differently

12

90° > 90°

1.5 X

slide-13
SLIDE 13

Drawbacks of transformation matrices

 Non-uniform scaling affects point vectors and

normal vectors differently

 Rotation matrices

  • Not suitable for interpolation
  • Encode the rotation axis and angle in a costly way

13

slide-14
SLIDE 14

Drawbacks of transformation matrices

 Non-uniform scaling affects point vectors and

normal vectors differently

 Rotation matrices

  • Not suitable for interpolation
  • Encode the rotation axis and angle in a costly way

14

Linear Algebra Extension

Quaternion

  • Represent and interpolate rotations consistently
  • Can be combined with isotropic scaling
  • Not well connected with other transformations
  • Not compatible with Plücker coordinates
  • Defined only in 3-D
  • W. R. Hamilton (1844) On a new species of imaginary quantities connected with

the theory of quaternions. In Proc. of the Royal Irish Acad., vol. 2, pp. 424-434.

slide-15
SLIDE 15

Linear Algebra

 Standard language for geometric problems  Well-known limitations  Aggregates different formalisms to obtain

complete solutions

  • Matrices
  • Plücker coordinates
  • Quaternion

 Jumping back and forth between formalisms requires

custom and ad hoc conversions

15

slide-16
SLIDE 16

Geometric Algebra

 High-level framework for geometric operations  Geometric elements as primitives for computation  Naturally generalizes and integrates

  • Plücker coordinates
  • Quaternion
  • Complex numbers

 Extends the same solution to

  • Higher dimensions
  • All kinds of geometric elements

16

slide-17
SLIDE 17

Outline

 Modules I, II, III and IV

  • Theoretical concepts

 Module V

  • Models of geometry

 Module VI

  • History
  • Application in visual computing
  • Concluding remarks

17

slide-18
SLIDE 18

Introduction

Module I

18

slide-19
SLIDE 19

Vector space

19

A vector space consists, by definition,

  • f elements called vectors
slide-20
SLIDE 20

Vector in a vector space

20

slide-21
SLIDE 21

Spanning subspaces

21

Geometric Meaning The subspace spanned by vectors a and b The resulting subspace is a primitive for computation!

slide-22
SLIDE 22

We need a basis for k-D subspaces

22

n-D Vector Space 2n-D Multivector Space

consists of 1-D elements called vectors, in the basis can handle k-D elements, for 0 ≤ k ≤ n It is not enough!

slide-23
SLIDE 23

Basis for multivector space

23

Scalars Vector Space Bivector Space Trivector Space

slide-24
SLIDE 24

Multivectors

 Basis for multivector space  Multivector

24

Scalars Vector Space Bivector Space Trivector Space

slide-25
SLIDE 25

Properties of the outer product

Antisymmetry Scalars commute Distributivity Associativity

25

slide-26
SLIDE 26

Computing with the outer product

 Basis for multivector space

26

Scalars Vector Space Bivector Space Trivector Space

slide-27
SLIDE 27

Computing with the outer product

 Basis for multivector space

27

Scalars Vector Space Bivector Space Trivector Space

slide-28
SLIDE 28

Scalars Vector Space Bivector Space Trivector Space

Computing with the outer product

 Basis for multivector space

28

Antisymmetry Scalars commute Distributivity

slide-29
SLIDE 29

Computing with the outer product

 Basis for multivector space

29

Scalars Vector Space Bivector Space Trivector Space

Antisymmetry Scalars commute Distributivity

slide-30
SLIDE 30

Computing with the outer product

 Basis for multivector space

30

Scalars Vector Space Bivector Space Trivector Space

slide-31
SLIDE 31

Metric and Some Inner Products

Module II

31

slide-32
SLIDE 32

The inner product of vectors

32

Geometric Meaning Measures the relation between vectors a and b

θ a b

Bilinear Form A scalar-valued function of vectors, like in Linear Algebra It defines a metric on the vector space

slide-33
SLIDE 33

Properties of the inner product of vectors

Symmetry Scalars commute Distributivity

33

slide-34
SLIDE 34

The metric matrix

 A practical way to implement the bilinear form Q  Defines the inner product of pairs of basis vectors

34

slide-35
SLIDE 35

The metric matrix

 A practical way to implement the bilinear form Q  Defines the inner product of pairs of basis vectors

35

Orthogonal 3-D Euclidean Metric

θ a b

slide-36
SLIDE 36

The scalar product

36

Geometric Meaning Extends the inner product of vectors to subspaces having the same dimensionality

θ

** Euclidean Metric

slide-37
SLIDE 37

Properties of the scalar product

Symmetry Scalars commute Distributivity

37

slide-38
SLIDE 38

The left contraction

38

Geometric Meaning Remove from the part that is like

slide-39
SLIDE 39

Properties of the left contraction

Symmetry Scalars commute Distributivity

39

slide-40
SLIDE 40

Basis orthogonalization

40

Resulting Basis

T is the whole space S is the whole space

slide-41
SLIDE 41

Checkpoint

 Geometric algebra uses a multivector space  Subspaces are primitives for computation  The outer product span subspaces  There are some metric products

  • The inner product of vectors
  • The scalar product
  • The left contraction

41

slide-42
SLIDE 42

Geometric Product

Module III

42

slide-43
SLIDE 43

Geometric product of vectors

43

Inner ProductOuter Product Unique Feature An invertible product for vectors! Denoted by a white space, like standard multiplication

slide-44
SLIDE 44

Geometric product of vectors

44

Unique Feature An invertible product for vectors!

The Inner Product is not Invertible γ

slide-45
SLIDE 45

Unique Feature An invertible product for vectors!

Geometric product of vectors

45

The Outer Product is not Invertible

slide-46
SLIDE 46

Geometric product of vectors

46

Inverse geometric product, denoted by a slash, like standard division Unique Feature An invertible product for vectors!

slide-47
SLIDE 47

Intuitive solutions for simple problems

47

t r p q ?

slide-48
SLIDE 48

Geometric product and multivector space

 The geometric product of two vectors is

an element of mixed dimensionality

48

Scalars Vector Space Bivector Space Trivector Space

slide-49
SLIDE 49

Geometric product and multivector space

 The geometric product of two vectors is

an element of mixed dimensionality

49

Scalars Vector Space Bivector Space Trivector Space Geometric Meaning The interpretation of the resulting element depends on the operands.

slide-50
SLIDE 50

Properties of the geometric product

Scalars commute Distributivity Associativity Neither fully symmetric nor fully antisymmetric

50

slide-51
SLIDE 51

The most fundamental product of GA

 The subspace products can be derived

from the geometric product

51

slide-52
SLIDE 52

Orthogonal Transformations as Versors

Module IV

52

slide-53
SLIDE 53

Reflection of vectors

53

Vector a was reflected in vector v, resulting in vector a Input vector Mirror

slide-54
SLIDE 54

k-Versor

54

V is a k-versor. It is computed

as the geometric product of

k invertible vectors.

slide-55
SLIDE 55

Rotation of subspaces

55

How to rotate vector a in the plane by radians.

slide-56
SLIDE 56

Rotation of subspaces

56

How to rotate vector a in the plane by radians.

slide-57
SLIDE 57

Rotation of subspaces

57

Rotors Unit versors encoding rotations. They are build as the geometric product

  • f an even number of unit invertible vectors.

How to rotate vector a in the plane by radians.

slide-58
SLIDE 58

Versor product for general multivectors

58

Grade Involution The sign change under the grade involution exhibits a + - + - + - … pattern over the value of t.

slide-59
SLIDE 59

Checkpoint

 The geometric product is the most fundamental

product of geometric algebra

  • It is an invertible product
  • The other linear products can be derived from it

 Versors encode linear transformations

  • Reflections
  • Rotations (rotors)

 Rotors generalize quaternions to n-D spaces

59

slide-60
SLIDE 60

Coffee Break

60

slide-61
SLIDE 61

Checkpoint

 Module I

  • Subspaces, the outer product, and

the multivector space

61

The resulting subspace is a primitive for computation!

slide-62
SLIDE 62

Checkpoint

 Module I

  • Subspaces, the outer product, and

the multivector space

62

Scalars Vector Space Bivector Space Trivector Space

slide-63
SLIDE 63

Checkpoint

 Module I

  • Subspaces, the outer product, and

the multivector space

 Module II

  • Metric and some inner products

63

The inner product of vectors The scalar product The left contraction

slide-64
SLIDE 64

Checkpoint

 Module I

  • Subspaces, the outer product, and

the multivector space

 Module II

  • Metric and some inner products

 Module III

  • Geometric product

64

slide-65
SLIDE 65

Checkpoint

 Module I

  • Subspaces, the outer product, and

the multivector space

 Module II

  • Metric and some inner products

 Module III

  • Geometric product

 Module IV

  • Orthogonal transformations as versors

65

slide-66
SLIDE 66

Models of Geometry

Module V

66

slide-67
SLIDE 67

Geometric Algebra models

 Assumes a metric to the space  Gives a geometrical interpretation to subspaces

  • Directions, points, straight lines, circles, etc.

 Makes versors behave like some transformation type

  • Scaling, rotation, translation, etc.

67

slide-68
SLIDE 68

Euclidean vector space model

 Euclidean metric matrix

68

slide-69
SLIDE 69

Euclidean vector space model

 Euclidean metric matrix  Subspaces

  • k-D directions

 Versors

  • Reflections
  • Rotations

69

slide-70
SLIDE 70

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix

70

2-D Working Space

slide-71
SLIDE 71

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix

71

How Stuff Works 2-D Working Space

slide-72
SLIDE 72

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix  Subspaces

  • Directions

72

How Stuff Works 2-D Working Space

slide-73
SLIDE 73

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix  Subspaces

  • Directions
  • Flats (point, line, plane)

73

How Stuff Works 2-D Working Space

slide-74
SLIDE 74

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix  Subspaces

  • Directions
  • Flats (point, line, plane)

74

How Stuff Works 2-D Working Space

slide-75
SLIDE 75

Homogeneous model

 One extra basis vector interpreted

as point at origin

 Euclidean metric matrix  Subspaces

  • Directions
  • Flats (point, line, plane)

 Versors

  • Rotations around the origin

75

slide-76
SLIDE 76

Conformal model

 Two extra basis vectors

  • Point at origin
  • Point at infinity

 Non-Euclidean metric

76

2-D Working Space

slide-77
SLIDE 77

Conformal model

 Two extra basis vectors

  • Point at origin
  • Point at infinity

 Non-Euclidean metric

77

2-D Working Space How Stuff Works

slide-78
SLIDE 78

Conformal model

 Subspaces

  • Points

78

2-D Working Space How Stuff Works

slide-79
SLIDE 79

Conformal model

 Subspaces

  • Points
  • Rounds (point pair, circle, sphere)

79

2-D Working Space How Stuff Works

slide-80
SLIDE 80

Conformal model

 Subspaces

  • Points
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)

80

2-D Working Space How Stuff Works

slide-81
SLIDE 81

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)

81

2-D Working Space How Stuff Works

slide-82
SLIDE 82

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)
  • Free (k-D direction)

82

2-D Working Space How Stuff Works

slide-83
SLIDE 83

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)
  • Free (k-D direction)

 Versors

  • Reflections

83

slide-84
SLIDE 84

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)
  • Free (k-D direction)

 Versors

  • Reflections
  • Rotations

84

slide-85
SLIDE 85

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)
  • Free (k-D direction)

 Versors

  • Reflections
  • Rotations
  • Translations

85

slide-86
SLIDE 86

Conformal model

 Subspaces

  • Tangent (point, tangent k-D direction)
  • Rounds (point pair, circle, sphere)
  • Flats (flat point, line, plane)
  • Free (k-D direction)

 Versors

  • Reflections
  • Rotations
  • Translations
  • Isotropic scaling

86

slide-87
SLIDE 87

History Application in Visual Computing Concluding Remarks

Module VI

87

slide-88
SLIDE 88

Why I never heard about GA before?

 Geometric algebra is a “new” formalism

88

  • D. Hestenes (2001) Old wine in new bottles..., in Geometric algebra with

applications in science and engineering, chapter 1, pp. 3-17, Birkhäuser, Boston. Hermann G. Grassmann (1809-1877) William R. Hamilton (1805-1865) William K. Clifford (1845-1879) Paul Dirac (1902-1984) Wolfgang E. Pauli (1900-1958) David O. Hestenes (1933-)

1920s 1877 1840s 1878 1980s, 2001

slide-89
SLIDE 89

Where geometric algebra has been applied

 Perwass (2004) detect corners, line segments, lines,

crossings, y-junctions and t-junctions in images

89

  • C. B. U. Perwass (2004) Analysis of local image structure using…, Instituts für Informatik

und Praktische Mathematik der Universität Kiel, Germany, Tech. Rep. Nr. 0403.

slide-90
SLIDE 90

Where geometric algebra has been applied

 Bayro-Corrochano et al. (1996) analyze the projective

structure of n uncalibrated cameras

90

  • E. Bayro-Corrochano, et al. (1996) Geometric algebra: a framework for computing point

and line correspondences and projective…, in Proc. of the 13th ICPR, pp. 334–338.

slide-91
SLIDE 91

Where geometric algebra has been applied

 Rosenhahn and Sommer (2005) define 2-D/3-D

pose estimation of different corresponding entities

91

  • B. Rosenhahn, G. Sommer (2005) Pose estimation in conformal geometric algebra part II:

real-time pose estimation using…, J. Math. Imaging Vis., 22:1, pp. 49–70.

slide-92
SLIDE 92

Where geometric algebra has been applied

 Hildenbrand et al. (2005) apply the conformal model

  • n the inverse kinematics of a human-arm-like robot

92

  • D. Hildenbrand et al. (2005), Advanced geometric approach for graphics and visual

guided robot object manipulation, in Proc. of the Int. Conf. Robot. Autom., pp. 4727–4732.

slide-93
SLIDE 93

Where geometric algebra has been applied

 Jourdan et al. (2004) perform automatic tessellation

  • f quadric surfaces

93

  • F. Jourdan et al. (2004), Automatic tessellation of quadric surfaces using Grassmann-

Cayley algebra, in Proc. Int. Conf. Comput. Vis. Graph., pp. 674–682.

slide-94
SLIDE 94

Where geometric algebra has been applied

 Lasenby et al. (2006) model higher dimensional

fractals

94

  • J. Lasenby et al. (2006), Higher dimensional fractals in geometric algebra, Cambridge

University Engineering Department, Tech. Rep. CUED/F-INFENG/TR.556.

slide-95
SLIDE 95

Drawbacks

 There are some limitations yet

  • Versors do not encode all projective transformations

95

Projective Affine Linear Similitude Perspective Rigid / Euclidean Isotropic Scaling Scaling Reflection Shear Translation Identity Rotation

slide-96
SLIDE 96

Drawbacks

 There are some limitations yet

  • Versors do not encode all projective transformations

 Efficient implementation of GA is not trivial

  • Multivectors may be big (2n coefficients)
  • Storage problems
  • Numerical instability

 Custom hardware is optimized for linear algebra

  • There is an US patent on the conformal model

96

  • A. Rockwood, H. Li, D. Hestenes (2005) System for encoding and

manipulating models of objects, U.S. Patent 6,853,964.

slide-97
SLIDE 97

Concluding remarks

 Consistent framework for geometric operations

  • Geometric elements as primitives for computation
  • Geometrically meaningful products

 Extends the same solution to

  • Higher dimensions
  • All kinds of geometric elements

 An alternative to conventional geometric approach  It should contribute to improve software development

productivity and to reduce program errors

97

slide-98
SLIDE 98

How to start

Geometric Algebra for Computer Science

  • L. Dorst – D. Fontijne – S. Mann

Morgan Kaufmann Publishers (2007)

Geometric Algebra with Applications in Engineering

  • C. Perwass

Springer Publishing Company (2009)

98

slide-99
SLIDE 99

Questions?

99

θ

slide-100
SLIDE 100

Extra

100

slide-101
SLIDE 101

Properties of subspaces (or blades)

Attitude The equivalence class , for any Weight The value of in , where is a reference blade with the same attitude as Orientation The sign of the weight relative to Direction The combination of attitude and orientation

101

slide-102
SLIDE 102

Dual representation of subspaces

102

Venn Diagram The orthogonal complement of is the (n - k)-D subspace included in and disjoint from

slide-103
SLIDE 103

Dual representation of subspaces

 “Taking the dual” operation  “Taking the undual” operation

103

slide-104
SLIDE 104

Euclidean vector space model

 Solving homogeneous systems of linear equations

104

slide-105
SLIDE 105

How to start (other tutorials)

 Geometric Algebra: a Computational Framework

for Geometrical Applications, Part 1

  • L. Dorst – S. Mann

IEEE Computer Graphics and Applications, 22(3):24-31 (2002)

 Geometric Algebra: a Computational Framework

for Geometrical Applications, Part 2

  • S. Mann – L. Dorst

IEEE Computer Graphics and Applications, 22(4):58-67 (2002)

 Geometric Algebra and Its Application

to Computer Graphics

  • D. Hildebrand – D. Fontijne – C. Perwass – L. Dorst

Tutorial at Eurographics (2004)

 Efficient Implementation of Geometric Algebra

  • D. Fontijne

Ph.D. Thesis, University of Amsterdam (2007)

105