Steven De Keninck PRO
Mathematical Experimentalist
GAME23 Sneak Peek
Martin Roelfs, PhD
Lattice Quantum Chromodynamics @ KULAK
GAME23 Sneak Peek
Martin Roelfs
Overview:
An Algebra of Geometry
An Algebra for Geometry
Martin Roelfs
// construct lines
line_from_points (p1, p2)
line_from_points_and_dir (p, d)
line_from_plucker (a, b, c, d, e, f)
// construct planes
plane_from_points (p1, p2, p3)
plane_from_point_and_dirs (p, d1, d2)
plane_from_points_and_dir (p1, p2, d)
plane_from_point_and_line (p, l)
plane_from_equation (a, b, c, d)
// Intersections
intersect_line_plane (l, P)
intersect_plane_plane (P1, P2)
intersect_planes (P1, P2, P3)
// Projections
project_point_plane (p, P)
project_line_plane (l, P)
project_point_line (p, l)
// construct transformations
mtx_translate (x, y, z)
mtx_rotate_euler (h, p, b)
mtx_rotate_axis_angle (x, y, z, a)
mtx_look_at (from, too, pole)
// apply transformations
transform_point (M, p)
transform_direction (M, d)
transform_line (M, l)
transform_plane (M, P)
Current state of affairs: linear algebra representation of geometry.
An Algebra for Geometry
Martin Roelfs
Wouldn't it be better if we had a single bag of numbers, where each element in this bag is an element of geometry?
Transform a by b:
Project a onto b:
(Projective) Geometric Algebra
Teaser: let a and b be any elements of geometry (points, lines, planes, translation, rotations, etc)
- Mathematical operations such as multiplication and addition are always geometrically meaningful
- Not tied to a particular number of dimensions
The idea of Geometric Algebra in just 30 mins.
A simple example ..
di=(f1−d01)−1hi=−d0dih0
Martin Roelfs
An Algebra for Geometry
The idea of Geometric Algebra in just 30 mins.
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
Martin Roelfs
An Algebra for Geometry
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
a=c−f
b=c−p
d0=a⋅b
Martin Roelfs
An Algebra for Geometry
di=(f1−d01)−1hi=−d0dih0
The paraxial approximation of the thin lens equation
(c−f)⋅
(c−p)
d0=
h0=(c−g)⋅(c−p)
Martin Roelfs
An Algebra for Geometry
The Geometry of Arrows and its Algebra.
Given the green arrows, all operations are well defined.
Martin Roelfs
An Algebra for Geometry
The Geometry of Arrows and its Algebra.
Given the green arrows, all operations are well defined.
Given the green points, no operation makes geometric sense.
Euclid's first postulate : two points determine a single line.
(and nothing else!)
Martin Roelfs
An Algebra for Geometry
The Geometry of Arrows and its Algebra.
For any operation ∘ between two points to be geometric, its result must be in the 1D line they span!
(that's addition, subtraction, all products ...)
Martin Roelfs
An Algebra for Geometry
The Geometry of Arrows and its Algebra.
Lines and Planes are even more problematic, and can not trivially be mapped to arrows or multi-arrows.
Martin Roelfs
An Algebra for Geometry
The Geometry of Arrows and its Algebra.
How can we improve this?
Martin Roelfs
An Algebra for Geometry
For the geometry of points, lines, planes ..
Instead of an algebra of arrows,
we use an algebra build from reflections.
k-reflections
Geometric Gauges
Martin Roelfs
An Algebra for Geometry
k-reflections
Geometric Gauges
Martin Roelfs
An Algebra for Geometry
k-reflections
Geometric Gauges
Elements = Transformations = k-Reflections
Martin Roelfs
An Algebra for Geometry
k-reflections
Geometric Gauges
Each k-reflection (with k>1) can be gauged without changing the result.
Martin Roelfs
An Algebra for Geometry
Gauges tell us how reflections combine!
Cartan-Dieudonné
Every orthogonal transformation in an n-dimensional embedding space
is composed from at most n reflections
Martin Roelfs
An Algebra for Geometry
This flavor of GA is called PGA.
Martin Roelfs
An Algebra for Geometry
ab Geometric Product composes reflections
Martin Roelfs
An Algebra for Geometry
a∧b Outer Product Intersects elements
Martin Roelfs
An Algebra for Geometry
a∨b Regressive Product joins elements
Martin Roelfs
An Algebra for Geometry
a⋅b Dot Product rejects elements
Martin Roelfs
An Algebra for Geometry
ab Geometric Product composes reflections
a∧b Outer Product Intersects elements
a∨b Regressive Product joins elements
a⋅b Dot Product rejects elements
Martin Roelfs
An Algebra for Geometry
(a⋅b)b−1 projects a onto b.
Martin Roelfs
An Algebra for Geometry
Product of two bireflections
Martin Roelfs
An Algebra for Geometry
Product of two bireflections
Martin Roelfs
An Algebra for Geometry
The sandwich XYX−1 transforms the element Y with the element X. Intuition:
Martin Roelfs
An Algebra for Geometry
To rotate the red line l by ab, we first rotate the space by ab, then we combine with l, and then we rotate the space back by ba.
ab l ba
Reflection of the point bc in the line a: a(bc)a
Martin Roelfs
An Algebra for Geometry
ab Geometric Product composes reflections
Martin Roelfs
An Algebra for Geometry
ab Geometric Product composes reflections
Martin Roelfs
An Algebra for Geometry
Formula can be read left to right, no information is hidden, no scalar ratios or coefficient calculations needed.
Martin Roelfs
An Algebra for Geometry
∨ = join ∧ = meet ∙ = dot
Martin Roelfs
An Algebra for Geometry
Martin Roelfs
An Algebra for Geometry
Martin Roelfs
An Algebra for Geometry
di=(f1−d01)−1hi=−d0dih0
h0=(c−g)⋅(c−p)
d0=(c−f)⋅(c−p)
i=−di(c−f) −hi(c−g)+c
no need for :
Martin Roelfs
An Algebra for Geometry
Implementing the Algebra of Geometry
All well and good, but how do I actually compute something?
Key observation: performing the same reflection twice is the same as doing nothing.
vvXv−1v−1=v2Xv−2
I.e., v2=±1.
Martin Roelfs
An Algebra for Geometry
Therefore our Algebra of Geometry can be represented using normalized vectors in a Clifford Algebra!
What on earth is the Clifford Algebra Rp,q,r?
Martin Roelfs
An Algebra for Geometry
The Clifford Algebra Rp,q,r has p positive, q negative, and r null basis vectors.
Consider the 2D example, R2,0,0. This has basis vectors e1,e2, satisfying e12=e22=1. Any vector is now of the form:
u=ae1+be2.
Martin Roelfs
An Algebra for Geometry
What is the square of u?
But there is nothing special about e1 and e2! In fact, you might have chosen what I called u as one of your basis vectors. Therefore we must have
such that u2=a2+b2. So orthogonal vectors anti-commute!
Any line is a linear combination u=ae1+be2.
Martin Roelfs
An Algebra for Geometry
We have also found a single point: e12:=e1e2.
So we can now form lines through the origin e12:=e1e2 as u=ae1+be2. What is the square of the point e12?
Martin Roelfs
An Algebra for Geometry
We recognize the scalar part as the dot product u⋅v=∣u∣∣v∣cosθ of the two vectors, whereas the second part is the exterior product u∧v=∣u∣∣v∣e12sinθ .
How about the product of two arbitrary lines through the origin?
It behaves like the imaginary unit i!
The product of two lines yields Euler's formula!
So we can now make all lines through the point e12, but we only have one point. We were promised origin independence! So where are the other points? To find them, we need another line orthogonal to e1 and e2.
Martin Roelfs
An Algebra for Geometry
Martin Roelfs
An Algebra for Geometry
The line at infinity, e0, is orthogonal to e1 and e2. Besides finding a new line, we also find two new points: e01,e02. Because these lie at infinity, they are called directions.
Recall that lines are specified by the linear equation
ax+by+δ=0
We can thus represent arbitrary lines in 2D as
u=ae1+be2+δe0,
where δ is the distance from the origin. Similarly, arbitrary directions (points on the horizon)
p∞=ye01+xe20
whereas arbitrary points are given by
p=e12+p∞=e12+ye01+xe20
What is the square of e0? Well, you cannot reflect in the horizon and live to tell about it!
Martin Roelfs
An Algebra for Geometry
Question: how would we now rotate around a given point (x,y) by an angle θ?
Since e02=0, all points are created equal:
p2=e122=−1
Thus all points generate their own local Euler's formula under exponentiation:
R=eθp=cosθ+psinθ
Directions are even easier, because they square to p∞2=0:
R=eap∞=1+ap∞
Martin Roelfs
An Algebra for Geometry
So we can straightforwardly rotate around any point X0 in space by sandwiching any quantity by R=eθp/2: X(θ)=RX0R−1=eθp/2X0e−θp/2.
Martin Roelfs
An Algebra for Geometry
In 2D we reflect in a line, in 3D in a plane, in nD in a hyperplane. In (pseudo-)Euclidean space E(p,q), hyperplanes satisfy the linear equation
ax+by+cz+...+δ=0
Therefore, hyperplanes can be represented by vectors in Rp,q,1, with basis vectors e02=0 and
e12=…=ep2=− ep+12=…=−ep+q2=1,
as
v=ae1+be2+ce3+...+δe0
To reflect a hyperplane w in a hyperplane v, use conjugation:
w→v[w]=vwv−1
Martin Roelfs
An Algebra for Geometry
Martin Roelfs
An Algebra for Geometry
Noteworthy spaces
Describes | Algebra | Group | Name |
---|---|---|---|
2D Plane | E(2) | "Planar quaternions" | |
3D Plane |
E(3) | Dual quaternions | |
Spacetime* | SO(1,3) | Lorentz transformations | |
Spacetime | Poin(3,1) | Poincare transformations |
Question: what is the difference between R1,3,0 and R1,3,1?
Closing remarks
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Duality
Vectors are always d−1 dimensional subspaces (hyperplanes). What if we want to make a true point, which remains a point if we change the dimension?
The dual of a d−k dimensional quantity is always a k dimensional quantity. E.g. in 2D, the dual of a line is a point. But in 3D, the dual of a plane, is also a point.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Duality
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Forces + Torque = Forque
In the body frame :
push at origin = translation
push at infinity = rotation
Force and Torque are both lines.
in any # dimensions.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Forces + Torque = Forque
The forque line is the dual of the "axis" of the transformation.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Thank you!
For more information, libs, tools and docs ...
https://bivector.net
Martin Roelfs
An Algebra for Geometry
On to the ganja.js Coffeeshop!
Visit to the ganja.js Coffeeshop!
Beyond Cartan-Dieudonné: The Discovery of Invariant Geometry
What happens to points in the plane when we perform an increasing number of reflections?
Martin Roelfs
The Discovery of Invariant Geometry
What happens to points in 3D space when we perform an increasing number of reflections?
Martin Roelfs
The Discovery of Invariant Geometry
Clearly we found a new line, but which one is it? To answer this question we must use gauges.
Martin Roelfs
The Discovery of Invariant Geometry
The Geometry of Physics
One mans linear momentum is another mans angular momentum
Martin Roelfs
The Geometry of Physics
One mans linear momentum is another mans angular momentum
Martin Roelfs
The Geometry of Physics
One mans linear momentum is another mans angular momentum
Martin Roelfs
The Geometry of Physics
Wigner rotation
Martin Roelfs
The Geometry of Physics
Alice has velocity uA, while Bob has velocity uB. In order for Alice to see the world from Bob's perspective, she could simply reflect over the bisector
uA+uB=2+2uA⋅uBuA+uB
However, this would leave her PT inverted, which may or may not be fatal, so it's best to first perform an extra reflection in place just to be sure:
Λ=(uA+uB)uA−1
This is the boost to transform from Alice to Bob:
ΛuAΛ=uB
Part 1: Theory and motivation
Introduction to Geometric Algebra in just 15 mins.
+
+
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
The atoms of Geometry turn out to be reflections
Martin Roelfs
An Algebra for Geometry
Thank you!
For more information, libs, tools and docs ...
https://bivector.net
Martin Roelfs
An Algebra for Geometry
Part 2: Refresher and Hands on
Hands-on session on Geometric algebra
+
+
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
Answer to some questions
+
+
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
// construct lines
line_from_points (p1, p2)
line_from_points_and_dir (p, d)
line_from_plucker (a, b, c, d, e, f)
// construct planes
plane_from_points (p1, p2, p3)
plane_from_point_and_dirs (p, d1, d2)
plane_from_points_and_dir (p1, p2, d)
plane_from_point_and_line (p, l)
plane_from_equation (a, b, c, d)
// Intersections
intersect_line_plane (l, P)
intersect_plane_plane (P1, P2)
intersect_planes (P1, P2, P3)
// Projections
project_point_plane (p, P)
project_line_plane (l, P)
project_point_line (p, l)
// construct transformations
mtx_translate (x, y, z)
mtx_rotate_euler (h, p, b)
mtx_rotate_axis_angle (x, y, z, a)
mtx_look_at (from, too, pole)
// apply transformations
transform_point (M, p)
transform_direction (M, d)
transform_line (M, l)
transform_plane (M, P)
Answer: if you call a couple of such functions in a sequence, there is no way to see if this can be simplified. If all of these operations are algebraic expressions on the other hand, you can simplify them.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
In 2D we reflect in a line, in 3D in a plane, in nD in a hyperplane. In (pseudo-)Euclidean space E(p,q), hyperplanes satisfy the linear equation
ax+by+cz+...+δ=0
Therefore, hyperplanes can be represented by vectors in Rp,q,1, with basis vectors e02=0 and
e12=…=ep2=− ep+12=…=−ep+q2=1,
as
v=ae1+be2+ce3+...+δe0
To reflect a hyperplane w in a hyperplane v, use conjugation:
w→v[w]=−vwv−1
Reflections are involutory, and thus demanding
v[v[w]]=w
leads to v2=v−2=±1.
Importantly, v[v]=−v.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
In d dimensions, we start from reflections in d−1 dimensional hyperplanes. k of these can then be intersected to form d−k dimensional elements of geometry.
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
The composition of two reflections leads to a handedness preserving isometry.
We call such transformations
Bireflections
Bireflections R=uv preserve handedness, and are continuous transformations.
Why two-sided transformations? If I ask you to write upside down, what is the easiest way to do it?
Comparison to matrices
+
+
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
In order to transform a point by a rotation and a translation in linear algebra, e.g. open3d.geometry.PointCloud.transform
, we use the covariant transformation
where p∞ is a 3-vector indicating a point on the horizon, po is the origin, R is a 3x3 rotation matrix, and t is a 3-vector encoding the translation.
This 4x4 matrix uses 16 floats, and can only transform points. For planes we have to use the 4x4 contravariant rep., and for lines the 6x6 adjoint rep. By contrast, the PGA equivalent rotor
R=a+be23+ce31+de12+ee01+fe02+ge03+he0123
transforms points, lines and planes identically using only 8 floats.
+
+
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
4x4 matrix multiplication : 64 multiplications, 48 additions, 16 floats
PGA motor multiplication : 48 multiplications, 40 additions, 8 floats
with a similar picture for the other elements :
scalar
vector
bivector
Martin Roelfs
An Algebra for Geometry
As
Martin Roelfs
An Algebra for Geometry
By Steven De Keninck
Martin Roelfs - An Algebra of Geometry