Steven De Keninck PRO
Mathematical Experimentalist
Geometric Algebra The Prequel.
Steven De Keninck & Martin Roelfs
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (amongst many other things) geometry.
An algebra on a graded linear (vector) space, with an invertible product that operates on multivectors.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
What is Geometric Algebra ?
We will first tackle the Algebra.
الكتاب المختصر في حساب الجبر والمقابلة
al-Kitāb al-Mukhtaṣar fī Ḥisāb al-Jabr wal-Muqābalah
The Compendious Book on Calculation by Completion and Balancing
1. New Numbers: why do we need them?
1. New Numbers: why do we need them?
x2+10x=39
=39
+25=64
(x+5)2=64
⇔x=3
x
x
x2
x
5
5x
x
5
5x
5
5
25
⎩⎨⎧
x+5
1. New Numbers: why do we need them?
ax2=bx
ax2=c
bx=c
ax2+bx=c
ax2+c=bx
bx+c=ax2
Why six equations ?????
No negative numbers, no zero !!
1. New Numbers: why do we need them?
Why six equations ?????
No negative numbers, no zero !!
x+1=1
x+1=0
zero!
negative numbers!
With 0 and negative numbers, we reduce the amount of equations from 6 to 1 !!!
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Transform point/line/plane/direction b with rotor a
aba~
Project any point/line/plane a on any point/line/plane b
ba⋅b
Compare this to the classic vector/matrix approach ...
// just a matrix multiply
transform_point( M, )
// similar to point .. diff. M
transform_direction( M, )
// should be 6x6 matrix
transform_line( M, )
// similar to direction .. diff. M
transform_plane( M, )
// none of these are similar..
project_point_line()
project_point_plane()
project_line_point()
project_line_plane()
project_plane_point()
project_plane_line()
Lets do the same with another simple equation..
e
e
e
e2=−1
e2=+1
e2=0
Rp,q,r
A Geometric Algebra is defined by this p,q,r signature specifying the metric of the n generators.
2. New Numbers: what are they?
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Transform point/line/plane/direction b with rotor a
aba~
Project any point/line/plane a on any point/line/plane b
ba⋅b
Rp,q,r
A Geometric Algebra is defined by this p,q,r signature specifying the metric of the n generators.
e1,e2,e3, all square to +1
e1 squares to +1, e2,e3,e4, all square to −1
e0 squares to 0, e1,e2,e3, all square to +1
We will use these generators to model vectors, points, circles, lines, planes, translations, boosts, rotations, screws, spheres, ...
ei∈/Rei2∈{0,1,−1}
2. New Numbers: what are they?
3. New Numbers: how do I use them?
ei∈/Rei2∈{0,1,−1}
x2∈R
(αe1+βe2)2∈R
α2e12+αβe1e2+αβe2e1+β2e22∈R
e1e2+e2e1=0
e1e2=−e2e1
e1
e2
x=αe1+βe2
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
What is this new e1e2=e12 element?
αe1+βe2
αe12
αe12
αe123
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
(e1−e2)e1=
e122=
e123e1=
21(e1+e2) (e2−e1)=
some exercises, with positive basis vectors.
21(e12−1+1−e21)=e12
↶
e1231=−e1213=e1123=e23
↶
↶
e1e1−e2e1=1+e12
↶
↶
e12e12=e1212=−e1221=−1
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
The geometric product of two 3 dimensional vectors
v1v2=(x1x2+y1y2+z1z2)+(x1y2−y1x2)e12+(−x1z2+z1x2)e31+(y1z2−z1y2)e23
v1=x1y1z1 v2=x2y2z2
≅v1×v2
Cross Product !
≅v1⋅v2
Dot Product !
v1=(x1e1+y1e2+z1e3)
v2=(x2e1+y2e2+z2e3)
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
The geometric product of two 3 dimensional vectors
v1v2=(x1x2+y1y2+z1z2)+(x1y2−y1x2)e12+(−x1z2+z1x2)e31+(y1z2−z1y2)e23
≅v1×v2
Cross Product !
≅v1⋅v2
Dot Product !
only scalar. 'Grade 0'.
v1⋅v2=⟨v1v2⟩0
only bivector. 'Grade 2'.
v1∧v2=⟨v1v2⟩2
Note : One scalar and three imaginary parts. The geometric product of two vectors in R3 is a quaternion!
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
The geometric product of two 3 dimensional vectors
v1v2=(x1x2+y1y2+z1z2)+(x1y2−y1x2)e12+(−x1z2+z1x2)e31+(y1z2−z1y2)e23
only scalar. 'Grade 0'.
v1⋅v2=⟨v1v2⟩0
only bivector. 'Grade 2'.
v1∧v2=⟨v1v2⟩2
v1v2=v1⋅v2+v1∧v2
*famous, but be careful! only if v1 or v2 is vector!
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
v1v2=v1⋅v2+v1∧v2
In general, the geometric product between a grade s multivector a and a grade t multivector b has grades from ∣s−t∣ to s+t in steps of 2.
The highest and lowest grade parts are often useful and are called the wedge and dot products respectively.
⟨a⟩s⋅⟨b⟩t=⟨ab⟩∣s−t∣
⟨a⟩s∧⟨b⟩t=⟨ab⟩s+t
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
3. New Numbers: how do I use them?
There are even more products from other branches of mathematics and physics
that map to some combination of or grade selection of the geometric product!
⟨a⟩s⋅⟨b⟩t=⟨ab⟩∣s−t∣
⟨a⟩s∧⟨b⟩t=⟨ab⟩s+t
(a∨b)∗=a∗∧b∗
a×b=21(ab−ba)
The Geometric Product
The Wedge Product
The Dot Product
The Vee Product
The Commutator Product
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
4. Cayley Tables !
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
4. SpaceTime Algebra!
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
The geometric numbers allow us to mix and match to create a number of interesting geometric algebras
R1,3
Spacetime Algebra or STA
physicist favorite!
γ0γ2=1000010000−10000−1 γ1=000−i00i00i00−i000 γ3=000−100−1001001000 =00−10000110000−100
σ1=[0110] σ2=[0i−i0] σ3=[100−1]
γ0=e0γ1=e1γ2=e2γ3=e3
σi=γiγ0⟹σ1=e10,σ2=e20,σ3=e30
I=γ0γ1γ2γ3=σ1σ2σ3
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
The geometric numbers allow us to mix and match to create a number of interesting geometric algebras
R1,3
Spacetime Algebra or STA
physicist favorite!
γ0γ2=1000010000−10000−1→e1,γ1=000−i00i00i00−i000→e3,γ3=000−100−1001001000→e2=00−10000110000−100→e4
σ1=[0110],σ2=[0i−i0],σ3=[100−1]
σi=γiγ0
R3≅ R1,3+
4. SpaceTime Algebra!
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
The spacetime split is a mapping between 3D space and STA using σi=γiγ0 .
4. SpaceTime Algebra!
4. SpaceTime Algebra!
time
space
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
The spacetime split is a mapping between 3D space and STA using σi=γiγ0 .
The definitive example of the power of the spacetimeis the singular Maxwell equation:
∂F=J⟹∂⋅F=J∂∧F=0
where ∂=γμ∂μ is the gradient operator, J=γμJμ is the source term, and F=E+IB is the field strength bivector. To prove that this indeed reproduces the familiar Maxwell equations, we use the spacetime split:
Jγ0∂γ0=J⋅γ0+J∧γ0=ρ+J=∂⋅γ0+∂∧γ0=∂t+∇
Most compact form of the Maxwell equations!
∂⋅F=J↔∂αFαβ=Jβ
∂∧F=0↔∂α(21ϵαβγδFγδ)=0
4. SpaceTime Algebra!
4. SpaceTime Algebra!
Projective or 'Plane-based' Geometric Algebra uses an extra basis vector to model elements at infinity. This enables a unification of rotations and translations, exception-free incidence, covariant transformations and more!
4. PGA - Projective Geometric Algebra
R3,0,1
R4
R3,1
FLAT
SPHERICAL
HYPERBOLIC
Felix Klein - Erlangen Program
ab
compose any a,b
a∧b
intersect any a,b
a∨b
join any a,b
(a⋅b)b−1
project any a onto/into b
for any point/line/plane a,b
Projective or 'Plane-based' Geometric Algebra uses an extra basis vector to model elements at infinity. This enables a unification of rotations and translations, exception-free incidence, covariant transformations and more!
4. PGA - Projective Geometric Algebra
Rn,0,1
Rn+1
Rn,1
FLAT
SPHERICAL
HYPERBOLIC
ab
compose any a,b
a∧b
intersect any a,b
a∨b
join any a,b
(a⋅b)b−1
project any a onto/into b
for any point/line/plane a,b
A very natural language to describe the geometry of points, lines and planes.
(can be bent into the conformal group and the geometry of spheres, circles and point-pairs)
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Prequel : Recap!
ei∈/Rei2∈{0,1,−1}
e1e2=−e2e1
⟨a⟩s⋅⟨b⟩t=⟨ab⟩∣s−t∣
⟨a⟩s∧⟨b⟩t=⟨ab⟩s+t
(a∨b)∗=a∗∧b∗
a×b=21(ab−ba)
Geometric Product
Wedge
Dot
Vee
Commutator
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Prequel : Recap!
Congratulations! You are now ready for geometry.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Transform point/line/plane/direction b with rotor a
aba~
Project any point/line/plane a on any point/line/plane b
ba⋅b
1. New Numbers: what are they?
The Key? Geometric Numbers.
e
e
e
Rp,q,r
The set we work with is generated by the real numbers, p positive, q negative and r null basis elements, conveniently called ei
e2=−1
e2=+1
e2=0
In PGA these new numbers e represent reflections
Euclidean geometry is the geometry of the Euclidean group Felix Klein
All transformations and elements in PGA are build by composing reflections.
Plane-based Geometric Algebra
e2=−1
e2=+1
e2=0
In PGA these new numbers e represent reflections
Euclidean geometry is the geometry of the Euclidean group Felix Klein
All transformations and elements in PGA are build by composing reflections.
Parallel Bireflection
Identical Bireflection
Intersecting Bireflection
Translation
Identity
Rotation
Bireflections have a gauge degree of freedom.
We study the composition of two reflections called a bireflection
Plane-based Geometric Algebra
When we combine 3 reflections, we get glide-reflections, and can always gauge it into a translation+reflection.
We can now gauge to make all mirrors orthogonal
So each trireflection is a translation and reflection along/in the same line.
Plane-based Geometric Algebra
When we combine k reflections, we get k−1 of these geometric gauges.
We can now gauge to make the grey mirrors overlap.
Identical mirrors vanish.
This happens automatically during composition.
Plane-based Geometric Algebra
When we combine k reflections, we get k−1 of these geometric gauges.
We can now gauge to make the grey mirrors overlap.
Identical mirrors vanish.
This happens automatically during composition.
0 | identity |
1 | reflection |
2 | translation/rotation |
3 | glide reflection |
4 | ⟶2 |
Plane-based Geometric Algebra
When we combine k reflections, we get k−1 of these geometric gauges.
0 | identity |
1 | reflection |
2 | translation |
3 | ⟶1 |
Visualizing 1D PGA
in 1D the situation is simple. We only have point reflections · and translations · ·
We want to have the same meaning for these elements in arbitrary dimensions, so we can use 1D techniques for any 1D subspace in nD
All elements in 1D PGA are visualized with at most 2 points.
•
••
Plane-based Geometric Algebra
Visualizing 2D PGA
0 | identity |
1 | reflection |
2 | translation/rotation |
3 | glide reflection |
4 | ⟶2 |
lines
points
translations
rotations
/
// X
// /
All elements of 2D PGA can be visualized as lines
1D
Plane-based Geometric Algebra
Visualizing 3D PGA
planes \
lines +
points ⚹
translations \\
rotations X
0 | identity |
1 | reflection |
2 | translation/rotation |
3 | glide/roto reflection |
4 | screw motion |
5 | ⟶3 |
\
\\ X
\X
\\X
1D
2D
Plane-based Geometric Algebra
By design, ideas from n-d are transplanted to work in (n+1)-d.
The structure of n-d PGA is exactly correct to get dimension-independent operators!
1D
2D
3D
Plane-based Geometric Algebra
The structure of n-d PGA is exactly correct to get dimension-independent operators!
There is one plane for each plane reflection, one line for each line reflection, one point for each point reflection.
1D
2D
3D
Plane-based Geometric Algebra
The elements and transformations of nD PGA are all k-reflections!
points = point-reflections
lines = line-reflections
planes = plane-reflections
These elements all are their own inverse .. they are all geometric numbers (a2=±1).
aaa~=±a
all these elements are invariant under their associated transormations.
3D
Plane-based Geometric Algebra
3D
The elements and transformations of nD PGA are all k-reflections!
points = point-reflections
lines = line-reflections
planes = plane-reflections
These elements all are their own inverse .. they are all geometric numbers (a2=±1).
aaa~=±a
all these elements are invariant under their associated transormations.
This makes it easy to find transformations that relate elements, using nothing but composition.
PP = translation
ll = rotation/translation/screw
pp = rotation/translation
But they produce twice the transformation we need - so we need a way to take square roots (x=x21), and with general powers we can generate general rotations/translations
ab=1+ab
(ab)α=eαlogab
Plane-based Geometric Algebra
Lets look at a classic - gluLookAt
void GLAPIENTRY gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz) { float forward[3], side[3], up[3]; GLfloat m[4][4]; forward[0] = centerx - eyex; forward[1] = centery - eyey; forward[2] = centerz - eyez; up[0] = upx; up[1] = upy; up[2] = upz; normalize(forward); /* Side = forward x up */ cross(forward, up, side); normalize(side); /* Recompute up as: up = side x forward */ cross(side, forward, up); __gluMakeIdentityf(&m[0][0]); m[0][0] = side[0]; m[1][0] = side[1]; m[2][0] = side[2]; m[0][1] = up[0]; m[1][1] = up[1]; m[2][1] = up[2]; m[0][2] = -forward[0]; m[1][2] = -forward[1]; m[2][2] = -forward[2]; glMultMatrixf(&m[0][0]); glTranslated(-eyex, -eyey, -eyez); }
Inputs
Output
Plane-based Geometric Algebra
Lets look at a classic - gluLookAt
void GLAPIENTRY gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz) { float forward[3], side[3], up[3]; GLfloat m[4][4]; forward[0] = centerx - eyex; forward[1] = centery - eyey; forward[2] = centerz - eyez; up[0] = upx; up[1] = upy; up[2] = upz; normalize(forward); /* Side = forward x up */ cross(forward, up, side); normalize(side); /* Recompute up as: up = side x forward */ cross(side, forward, up); __gluMakeIdentityf(&m[0][0]); m[0][0] = side[0]; m[1][0] = side[1]; m[2][0] = side[2]; m[0][1] = up[0]; m[1][1] = up[1]; m[2][1] = up[2]; m[0][2] = -forward[0]; m[1][2] = -forward[1]; m[2][2] = -forward[2]; glMultMatrixf(&m[0][0]); glTranslated(-eyex, -eyey, -eyez); }
Inputs
Output
r1
r2
r3
M=1,P=1∗
P=P∨pi
M=PMriM~M
p1
p2
p3
Plane-based Geometric Algebra
Lets look at a classic - gluLookAt
// input : p = array of euclidean/infinite points // output : motor that aligns the reference frame to p function align(p) { var M=1, P=!1; for (var i=0; i<p.length; ++i) { P = (P & p[i]).Normalized; M = sqrt(P * (M >>> r[i])) * M; } return M }
M=1,P=1∗
P=P∨pi
M=PMriM~M
Plane-based Geometric Algebra
Thank you.
https://bivector.net
Plane-based Geometric Algebra
PGA
A
B
C
Motivation + intuition
Steven
Algebraic foundation
Leo
Applications: IK + RBD
Steven
A | B | A | B | C | C |
---|
Plane-based Geometric Algebra
Episode 1 : The Reflection Menace
Episode 2 : Attack of the Mirrors
Episode 3 : Revenge of Infinity
Episode 4 : The Forque Awakens
Episode 5 : A New Hope I
Episode 6 : A New Hope II
Plane-based Geometric Algebra
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (computer) geometry.
An algebra on a graded linear (vector) space, with an invertible product that operates on multivectors.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Transform any point/line/plane/... b with any rotor a
aba~
Project any point/line/plane a on any point/line/plane b
ba⋅b
Plane-based Geometric Algebra
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (computer) geometry.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
Transform point/line/plane/direction b with rotor a
aba~
Project any point/line/plane a on any point/line/plane b
ba⋅b
Compare this to the classic vector/matrix approach ...
// just a matrix multiply
transform_point( M, )
// similar to point .. diff. M
transform_direction( M, )
// should be 6x6 matrix
transform_line( M, )
// similar to direction .. diff. M
transform_plane( M, )
// none of these are similar..
project_point_line()
project_point_plane()
project_line_point()
project_line_plane()
project_plane_point()
project_plane_line()
Plane-based Geometric Algebra
Coordinate free and Dimension agnostic.
We do not commonly expect to be able to download e.g. a 2D physics engine and change the number of dimensions to 3.
Constructions and products that are only valid in 3D are commonly used in the description of geometry and physics. (e.g. the cross product)
Can we do better?
on a need to know basis
Plane-based Geometric Algebra
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (computer) geometry.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
this is not a vector.
ceci n'est pas un vecteur
this is a vector.
how many dimensions ?
does it have an orientation ?
x2=∥x∥2
only its length is well defined.
Coordinate free and Dimension agnostic.
Plane-based Geometric Algebra
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (computer) geometry.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
x2=∥x∥2
When a second non colinear vector is added
There is more to being dimension agnostic, but not having an origin and coordinate axes is a good starting point. Logic with points, lines, planes should work independent of the dimensionality of the space!
Coordinate free and Dimension agnostic.
Plane-based Geometric Algebra
What is Geometric Algebra ?
An alternative to vector/matrix algebra ideal for (computer) geometry.
⊕
⊕
↺
⊕
⊕
R
...
PSS
scalars
vectors
bivectors
pseudo scalar
There is more to being dimension agnostic, but not having an origin and coordinate axes is a good starting point. Logic with points, lines, planes should work independent of the dimensionality of the space!
Coordinate free and Dimension agnostic.
a
b
Expressions that involve a,b,c should not depend on the # of coefficients used to describe them :
c
The First Postulate
Steven De Keninck
The First Postulate
In this talk:
The First Postulate
R3,0,1
3 basis vectors e1,e2,e3
1 null basis vector e0
ei∈/Rei2∈{1,−1,0}
e1e2=−e2e1
e0,e1,e2,e3
e01,e02,e03,e12,e31,e23
e021,e013,e032,e123
e0123
1
→ scalar
→ vector
→ bivector
→ trivector
→ pseudo-scalar
vector = linear comb of generators
xyzw→xe1+ye2+ze3+we0
bivectors eij, trivectors eijk, ...
multivector = sum of k-vectors
ab=a⋅b+a∧b
⟨a⟩k selects grade k of a
skipping many aspects here: reverses, inverses, dualization, exponentials and logarithms, natural inclusion of (dual) quaternions, Lie algebras, etc ...
⟨a⟩s⟨b⟩t=⟨ab⟩∣s−t∣+...+⟨ab⟩s+t
The Geometric Product
⟨a⟩s∧⟨b⟩t=⟨ab⟩s+t
The Wedge Product
⟨a⟩s⋅⟨b⟩t=⟨ab⟩∣s−t∣
The Dot Product
(a∨b)∗=a∗∧b∗
The Vee Product
−1st⟨a⟩s⟨b⟩t⟨a⟩s
The Sandwich Product
The First Postulate
So how will we use all this to do geometry?
what is geometry even?
set of elements + distance function
set of transformations + invariants
ex. 'Geometry of Arrows' : the set of arrows, and the angle between them.
ex. 'Geometry of Arrows' : the set of orthonormal transformations.
ex. 'Geometry of family' : the set of family members and the parental distance between them.
parent
you
sibling
ex. 'Geometry of Points/Lines/Planes ..' : the set of Euclidean transformations.
the one we want for CG!
The First Postulate
First, let us review the geometry of arrows, and the vector algebra operators.
but does this still work if we use arrows to represent points?
For the geometry of arrows, these operations are all well defined. Given just the orange inputs, you can reconstruct the green output.
Two points define a line. AND NOTHING ELSE!
⇒ EVERY binary operation between two points is a one dimensional operation!
The First Postulate
Two points define a line. AND NOTHING ELSE!
⇒ EVERY binary operation between two points is a one dimensional operation!
so, for points A,B, all operations A+B,A−B,AB,A∧B,A∨B,... must produce a result on the line between A and B (or zero). In general, the types of elements determine exactly the set of geometrically plausible outputs.
Can we set things up so that all operators always produce geometrically valid outcomes?
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
A
A+A ?
AA ?
The result must be a point again, and it can only be at that position!
⟶ every 'algebra of geometry' MUST be homogeneous!
⟶ A+A = 2A still A, but twice as happy.
If you only have one point, then any transformation is the identity!
⟶ AA ≅ 1 , the transformation that takes A to A.
⟶ if AA is identity, then A is an involutory transformation. A is a reflection!
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
A
A+B ?
The result must be a point, for equally happy A,B it will be halfway.
B
A+B
AB ?
With A and B point reflections (and points), AB is a translation (try it!)
ABA ?
The point B reflected in A.
BAB ?
The point A reflected in B.
ABA
BAB
AB
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
A
A+B ?
B
A+B
AB ?
ABA ?
BAB ?
x=1⟺x−1=0
e1−e0
e1−2e0
(e1−e0)+(e1−2e0)=2e1−3e0 ⟺2x−3=0⟺x=1.5
(e1−e0)(e1−2e0)=1−2e10−e01=1+e01
(e1−e0)(e1−2e0) (e1−e0)=e1 ⟺x=0
(e1−e0)(e1−2e0) (e1−e0)=e1−3e0 ⟺x=3
ABA
BAB
x=2⟺x−2=0
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
What if we move to a new viewpoint?
It is possible our points weren't points at all! This however can not change the behavior we saw from our original point of view!
The equivalence principle : if you can make it look like a duck, it'll quack.
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
The equivalence principle : if you can make it look like a duck, it'll quack.
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
Now that we know lines must be line reflections we can check bi-reflections easily ..
Rotation
Translation
Point Reflection
Bireflections have a gauge degree of freedom.
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
A
A
e1+e0
e12+e02
→x=−1
same meaning, different geometry!
still the same point reflection!
e12+e02=(e1+e0)e2
x=−1
y=0
→ Product of two orthogonal vectors is a pure bivector. Reflecting in two orthogonal mirrors is a point reflection in their intersection point.
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
A+B
A-B
The sum of two elements is their bisector, the element halfway in between.
The difference of two elements is the other bisector, for parallel elements, it is at infinity!
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
Points A,B
Parallel Lines A,B
Parallel Planes A,B
Intersecting Lines A,B
Intersecting Planes A,B
Bisector 1
Bisector 1
Bisector 2
@infinity
Bisector 2
Translation
Rotation
A+B
A-B
AB
remember, the geometric product is the core product, with all others deriving from it.
The First Postulate
Can we set things up so that all operators always produce geometrically valid outcomes?
At this point, we have an actual algebra of geometry. Our set of elements are the point(reflection)s, line(reflection)s, plane(reflection)s, ... multiplication with scalars, addition and multiplication between elements all are always geometrically valid!
But, we are not done yet - to get an intuitive understanding we still need a way to visualize all the different products - and for that the Geometric Gauges are key!
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
reflection/line
reflection/point
rotation
translation
when combining reflections, only the relative position matters.
e.g. any set of orthogonal line-reflections through a point produces the same point-reflection.
this gives us a 'geometric gauge' degree of freedom, which we can use to understand all the different products.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The dot product eliminates parallel mirrors.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The dot product eliminates parallel mirrors.
The regressive product keeps identical mirrors.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The dot product eliminates parallel mirrors.
The regressive product keeps identical mirrors.
The outer product finds orthogonal mirrors.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The dot product eliminates parallel mirrors.
The regressive product keeps identical mirrors.
The outer product finds orthogonal mirrors.
The First Postulate
After picking the viewpoint where things look most simple, we will use the gauges to understand exactly what all of the products do geometrically.
The geometric product eliminates identical mirrors.
The dot product eliminates parallel mirrors.
The regressive product keeps identical mirrors.
The outer product finds orthogonal mirrors.
Cartan-Dieudonne :
Every orthogonal transformation in an n-dimensional symmetric bilinear space can be described as the composition of at most n reflections.
The First Postulate
Tackling geometric problems :
The First Postulate
ab Geometric Product composes reflections
a∧b Outer Product Intersects elements
a∨b Regressive Product joins elements
a⋅b Dot Product rejects elements
The First Postulate
The First Postulate
Now, lets see it in action!
di=(f1−d01)−1hi=−d0dih0
The First Postulate
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
The First Postulate
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
a=c−f
b=c−p
d0=a⋅b
The First Postulate
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
(c−f)⋅
(c−p)
d0=
h0=(c−g)⋅(c−p)
The First Postulate
The paraxial approximation of the thin lens equation
There are no coefficients or even ratios, and the formula can be read from left to right.
The First Postulate
The paraxial approximation of the thin lens equation
∨ = join ∧ = meet ∙ = dot
The First Postulate
The paraxial approximation of the thin lens equation
The First Postulate
Thanks!
Be sure to check Hamish's bonus talk - straight from GDC - with more real world examples!
There are still many things left uncovered, but they all build on the same simple ideas.
Itsy Bitsy Spinor
Steven De Keninck
Itsy Bitsy Spinor
geometric product | a * b |
meet (intersect) | a ^ b |
join (span) | a & b |
dot product | a | b |
sandwich product | a >>> b |
dual | !a |
a point at x,y,.. | !(1e0 + x*1e1 + y*1e2 + ...) |
a plane with eq ax + by + .. + d = 0 | a*1e1 + b*1e2 + ... + d*1e0 |
rotate α around line L | Math.E ** ( -0.5 * α * L.Normalized ) |
Exercises at :
https://bivector.net/game2023.html
Plane-based Geometric Algebra
Plane-based Geometric Algebra
PGA
Infinity, Duality, Orientation, Forques.
Episode 3 : Revenge of Infinity
Plane-based Geometric Algebra
Infinity, Duality, Orientation, Forques.
Plane-based Geometric Algebra
PGA
Plane-based Geometric Algebra
The homogeneous model of the Euclidean plane
Text
Parallel lines intersect in points at infinity. This means intersection queries always have meaningful answers.
But infinite elements also enable duality
Plane-based Geometric Algebra
# Euclidean Lines + 1 Infinite Line = # Euclidean Points + # Infinite Points
{
{
3D Planes through origin
3D Lines through origin
a∗∧b∗=(a∨b)∗
Same code to find intersection (meet) and span (join) !!
All code has two functions!
meet ↔ join
point ↔ line
Plane-based Geometric Algebra
# Euclidean Lines + 1 Infinite Line = # Euclidean Points + # Infinite Points
a∗∧b∗=(a∨b)∗
translations are rotations around infinite elements !
Plane-based Geometric Algebra
Plane-based Geometric Algebra
robot arm
floor plan
robot arm
Both 2D drawings have points and lines. What happens if we go from two to three dimensions?
Duality and dimension independence
Plane-based Geometric Algebra
robot arm
floor plan
robot arm
Both 2D drawings have points and lines. What happens if we go from two to three dimensions?
Duality and dimension independence
Lines defined as 1-vectors.
Points defined as 2-vectors.
→ switch types.
Lines defined as d-1 vectors.
Points defined as d-vectors.
→ stay the same type.
Plane-based Geometric Algebra
Duality and dimension independence
These can be combined - picking the correct type is key to being dimension independent.
But there is more to these types .. lets talk about orientation.
→ switch types.
→ stay the same type.
Plane-based Geometric Algebra
But there is more to these types .. lets talk about orientation.
Extrinsic
Intrinsic
MEET
JOIN
These types behave differently under reflection!
Plane-based Geometric Algebra
These concepts of two types of elements and two types of orientation are key to a dimension independent, geometric treatment of dynamics.
∞ elements, 2k-reflections
INERTIAL DUALITY
Plane-based Geometric Algebra
Forques unify linear force and angular torque.
Forques are join lines - in any number of dimensions
In the body frame, Forces and Accelerations are each others dual!!!
Forces are Join Lines - Accelerations are Meet Lines
In the body frame :
push at o = rotate around ∞
push at ∞ = rotate around o
This is a tremendous simplification for the treatment of inertia.
No more need for Steiners theorem!
Fully geometric and intuitive!
Plane-based Geometric Algebra
The Geometric Overview of Rigid Body Dynamics.
FORQUE
ACCELERATION
MOMENTUM
VELOCITY
P=∫F
V=∫A
F=P˙
A=V˙
duality
duality
inertial
inertial
Join line through the contact point
Sum of join lines.
Meet line through the motion center
Sum of meet lines.
(d−1)-vectors
2-vectors
POSITION
M=∫V
V=M˙
Motor (2k-refl)
F=maτ=mr×F
P=mvL=Iω
F=A⋆
P=V⋆
Plane-based Geometric Algebra
Thanks !
Plane-based Geometric Algebra
Plane-based Geometric Algebra
PGA
Infinity, Duality, Orientation, Forques.
Episode 5 : A New Hope I
Plane-based Geometric Algebra
Plane-based Geometric Algebra
PGA
Infinity, Duality, Orientation, Forques.
Episode 5 : A new Hope I
Programming Geometric Algebra
To truly harvest the power of GA, a library that supports operator overloading is a must. (at the minimum, for prototyping)
Math Syntax
ab
a∧b
a∨b
a⋅b
a∗
aba~
Name
Geometric Product
Outer Product - Wedge
Regressive Product - Vee
Inner Product - Dot
Dual
Sandwich Product
Programming Syntax
a * b a ^ b a & b a | b !a a >>> b
Plane-based Geometric Algebra
Infinity, Duality, Orientation, Forques.
Programming Geometric Algebra
1. Thin Lens (Paraxial Approx.)
*from phys.libretexts.org
di= (f1−d01)−1
hi=−d0dih0
not very geometric .. but ..
2. Inverse Kinematics
Given a thin lens, focal distance and source point calculate the position of the image point.
Given a base and target, calculate all joint orientations.
Plane-based Geometric Algebra
Infinity, Duality, Orientation, Forques.
Programming Geometric Algebra
1. Thin Lens (Paraxial Approx.)
*from phys.libretexts.org
di= (f1−d01)−1
hi=−d0dih0
not very geometric .. but ..
Plane-based Geometric Algebra
Plane-based Geometric Algebra
PGA
Infinity, Duality, Orientation, Forques.
Episode 6 : A New Hope II
Plane-based Geometric Algebra
Plane-based Geometric Algebra
PGA
Infinity, Duality, Orientation, Forques.
Episode 6 : A new Hope II
The Geometric Overview of Rigid Body Dynamics.
FORQUE
ACCELERATION
MOMENTUM
VELOCITY
P=∫F
V=∫A
F=P˙
A=V˙
duality
duality
inertial
inertial
Join line through the contact point
Sum of join lines.
Meet line through the motion center
Sum of meet lines.
(d−1)-vectors
2-vectors
POSITION
M=∫V
V=M˙
Motor (2k-refl)
F=maτ=mr×F
P=mvL=Iω
F=A⋆
P=V⋆
Plane-based Geometric Algebra
Infinity, Duality, Orientation, Forques.
The Geometric Overview of Rigid Body Dynamics.
FORQUE
ACCELERATION
MOMENTUM
VELOCITY
P=∫F
V=∫A
F=P˙
A=V˙
duality
duality
inertial
inertial
Join line through the contact point
Sum of join lines.
Meet line through the motion center
Sum of meet lines.
(d−1)-vectors
2-vectors
POSITION
M=∫V
V=M˙
Motor (2k-refl)
F=maτ=mr×F
P=mvL=Iω
F=A⋆
P=V⋆
PGA Rigid Body Dynamics
We want it to work in n-d, so we'll need a 'rigid body' that works in 2D and 3D. We'll keep it simple and go for a square/cube.
0
1
2
3
00
01
10
11
0,0
0,1
1,0
1,1
(A^B)&(A^B-1) == 0 -> A,B differ 1 bit
By Steven De Keninck
A hands on introduction to Projective Geometric Algebra for Game and Graphics programmers.