49
CG UFRGS Visgraf - Summer School in Computer Graphics - 2010 Introduction to Geometric Algebra Lecture I Leandro A. F. Fernandes [email protected] Manuel M. Oliveira [email protected]

Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

  • Upload
    others

  • View
    25

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

CG UFRGS

Visgraf - Summer School in Computer Graphics - 2010

Introduction to Geometric Algebra Lecture I

Leandro A. F. Fernandes [email protected]

Manuel M. Oliveira [email protected]

Page 2: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

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

Page 3: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Using vectors to encode geometric data

Directions Points

3

Page 4: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

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.

Page 5: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Assembling geometric data

Straight lines

Point vector

Direction vector

5

Page 6: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Assembling geometric data

Straight lines

Point vector

Direction vector

Planes

Normal vector

Distance from origin

6

Page 7: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Assembling geometric data

Straight lines

Point vector

Direction vector

Planes

Normal vector

Distance from origin

Spheres

Center point

Radius

7

Page 8: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

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.

Page 9: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Intersection of two geometric elements

A specialized treatment for each pair of elements

Straight line × Straight line

Straight line × Plane

Straight line × Sphere

Plane × Sphere

etc.

Special cases must be handled explicitly

e.g., Straight line × Straight line may return • Empty set

• Point

• Straight line

9

Page 10: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Intersection of two geometric elements

A specialized treatment for each pair of elements

Straight line × Straight line

Straight line × Plane

Straight line × Sphere

Plane × Sphere

etc.

Special cases must be handled explicitly

e.g., 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.

Page 11: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Projective

Affine

Linear

Using matrices to encode transformations

11

Similitude

Perspective

Rigid / Euclidean

Isotropic Scaling

Scaling

Reflection

Shear

Translation

Identity

Rotation

Page 12: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Drawbacks of transformation matrices

Non-uniform scaling affects point vectors and

normal vectors differently

12

90° > 90°

1.5 X

Page 13: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

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

Page 14: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

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.

Page 15: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Linear Algebra

Standard language for geometric problems

Well-known limitations

Aggregates different formalisms to obtain

complete solutions

Matrices

Plücker coordinates

Quaternions

Jumping back and forth between formalisms requires

custom and ad hoc conversions

15

Page 16: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Geometric Algebra

High-level framework for geometric operations

Geometric elements as primitives for computation

Naturally generalizes and integrates

Plücker coordinates

Quaternions

Complex numbers

Extends the same solution to

Higher dimensions

All kinds of geometric elements

16

Page 17: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Outline

Lecture I

17

Page 18: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Outline for this week

Lecture I – Mon, January 11 Subspaces

Multivector space

Some non-metric products

Lecture II – Tue, January 12 Metric spaces

Some inner products

Dualization and undualization

Lecture III – Fri, January 15 Duality relationships between products

Blade factorization

Some non-linear products

Visgraf - Summer School in Computer Graphics - 2010 18

Page 19: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Outline for next week

Lecture IV – Mon, January 18 Geometric product

Versors

Rotors

Lecture V – Tue, January 19 Models of geometry

Euclidean vector space model

Homogeneous model

Lecture VI – Fri, January 22 Conformal model

Concluding remarks

Visgraf - Summer School in Computer Graphics - 2010 19

Page 20: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Reference material (on-line available)

Geometric Algebra: A powerful tool for solving

geometric problems in visual computing L. A. F. Fernandes – M. M. Oliveira

Tutorials of Sibgrapi (2009)

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)

20

Page 21: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Reference material (books)

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)

Geometric computing with Clifford algebras G. Sommer

Springer Publishing Company (2001)

Visgraf - Summer School in Computer Graphics - 2010 21

Page 22: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Subspaces

Lecture I

22

Page 23: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Vector space

23

A vector space consists, by definition,

of elements called vectors

Page 24: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Vector in a vector space

24

Page 25: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Spanning subspaces

25

Geometric Meaning

The subspace spanned

by vectors a and b The resulting subspace is

a primitive for computation!

Page 26: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

k-D oriented subspaces

k-D oriented subspaces (or k-blades) are built as the

outer product of k vectors spanning it, for 0 ≤ k ≤ n

Visgraf - Summer School in Computer Graphics - 2010 26

0-blade

1-blade

2-blade

3-blade

n-blade

Page 27: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Properties of subspaces

Attitude The equivalence class , for any

27

Vectors with the

same attitude Attitude

Page 28: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Properties of subspaces

Attitude The equivalence class , for any

Weight The value of in , where

is a reference blade with the same attitude

as

28

Reference

Weighted vector

Page 29: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Properties of subspaces

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

29

Reference

Positive orientation +

Negative orientation -

Page 30: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Properties of subspaces

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

30

Vectors with

different directions Attitude

Page 31: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

We need a basis for k-D subspaces

31

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!

Page 32: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Basis for multivector space

32

Scalars Vector Space Bivector Space Trivector Space

Page 33: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Multivectors

Basis for multivector space

Multivector

33

Scalars Vector Space Bivector Space Trivector Space

Page 34: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Definition issues

Multivector The weighted combination of basis

elements of

k-vector The weighted combination of basis

elements of

k-blade The outer product of k vector factors

34

Step

Grade

Page 35: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Notable k-vectors

Only these k-vectors are always also blades in n-D

k-vector Linear Space Special Name

0-vector scalar

1-vector vector

(n-1)-vector pseudovector

n-vector pseudoscalar

35

Page 36: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Outer product

Lecture I

36

Page 37: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Properties of the outer product

Antisymmetry

Scalars commute

Distributivity

Associativity

37

Page 38: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Computing with the outer product

Basis for multivector space

38

Scalars Vector Space Bivector Space Trivector Space

Page 39: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Computing with the outer product

Basis for multivector space

39

Scalars Vector Space Bivector Space Trivector Space

Page 40: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Scalars Vector Space Bivector Space Trivector Space

Computing with the outer product

Basis for multivector space

40

Antisymmetry

Scalars commute

Distributivity

Page 41: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Computing with the outer product

Basis for multivector space

41

Scalars Vector Space Bivector Space Trivector Space

Antisymmetry

Scalars commute

Distributivity

Page 42: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

Computing with the outer product

Basis for multivector space

42

Scalars Vector Space Bivector Space Trivector Space

Page 43: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Visgraf - Summer School in Computer Graphics - 2010

The regressive product

Lecture I

43

Page 44: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

The notion of duality

The complementary grade of a grade k is n-k

Visgraf - Summer School in Computer Graphics - 2010 44

Venn Diagram Venn Diagrams

Page 45: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

The notion of duality

The complementary grade of a grade k is n-k

Visgraf - Summer School in Computer Graphics - 2010 45

Page 46: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

The notion of duality

The complementary grade of a grade k is n-k

The regressive product is correctly dual to the

outer product

k-blade are also built as the regressive product

of n-k pseudovectors

Visgraf - Summer School in Computer Graphics - 2010 46

Page 47: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Regressive Product

Returns the subspace shared by two blades

Visgraf - Summer School in Computer Graphics - 2010 47

c

Page 48: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Properties of the regressive product

Antisymmetry

Scalars commute

Distributivity

Associativity

Visgraf - Summer School in Computer Graphics - 2010 48

Page 49: Introduction to Geometric Algebra - VISGRAF Lab...Geometric algebra for computer science L. Dorst – D. Fontijne – S. Mann Morgan Kaufmann Publishers (2007) Geometric algebra with

Credits

Visgraf - Summer School in Computer Graphics - 2010 49

Hermann G. Grassmann

(1809-1877)

Grassmann, H. G. (1877) Verwendung der Ausdehnungslehre fur die allgemeine Theorie

der Polaren und den Zusammenhang algebraischer Gebilde. J. Reine Angew. Math.

(Crelle's J.), Walter de Gruyter Und Co., 84, 273-283