Last updated: 2026-11-26
23. Points, directions and motions in the conformal algebra
For new readers
The bottom of the tree. Every point, direction and motion in the renderer is a multivector of the conformal algebra Cl(4,1): a point is a null vector, a direction is a bivector with e∞, and a move or a turn is a versor applied as a sandwich. This page opens the algebra, the points and directions built on it, and the transformations; matrices and the canvas complete the foundations.
Tuples, Points, and Vectors
The book represents points and vectors as 4-tuples (x, y, z, w) with w = 1
for points and w = 0 for vectors. Here a tuple is a multivector of the
conformal geometric algebra Cl(4,1), and the book's operations fall out of
the algebra instead of being defined by hand.
Step 1 — the algebra: Cl(4,1)
Basis vectors e1 e2 e3 e+ e- with squares +1 +1 +1 +1 -1. A basis blade is a
5-bit mask, so a multivector is a 32-element list. The sign of a blade product
is the reordering sign times the metric sign of repeated vectors.Cl(4,1) has signature (4,1): four positives, one negative.
make a function called ga_popcount takes n returns c
let c = 0
let m = n
while m != 0 do
let c = c + (m band 1)
let m = m shr 1
end
return c
end
# Sign of the geometric product of blades a and b: the reordering sign
# (swaps needed to sort the concatenated factors) times the metric sign
# of the repeated vectors (only e- contributes -1).
make a function called ga_blade_sign takes a, b returns s
let swaps = 0
let t = a shr 1
while t != 0 do
let swaps = swaps + ga_popcount(t band b)
let t = t shr 1
end
let s = 1
if (swaps % 2) == 1 then
let s = -1
end
if ((a band b) band 16) != 0 then
let s = 0 - s
end
return s
end
One shared loop gives the geometric product, the outer (wedge) product and the left contraction; it skips zero coefficients so sparse operands stay cheap.
# Shared product loop. mode 0 = geometric product; 1 = outer (wedge),
# keeps grade(a_i)+grade(b_j); 2 = left contraction, keeps
# grade(b_j)-grade(a_i). Skips zero coefficients, so products of sparse
# elements (points, rotors) stay cheap.
make a function called ga_product takes a, b, mode returns mv
let r = ga_zero()
let i = 0
while i < 32 do
let ai = a[i]
if ai != 0 then
let gi = ga_popcount(i)
let j = 0
while j < 32 do
let bj = b[j]
if bj != 0 then
let k = i bxor j
let keep = true
if mode == 1 then
let keep = ga_popcount(k) == gi + ga_popcount(j)
end
if mode == 2 then
let keep = ga_popcount(k) == ga_popcount(j) - gi
end
if keep then
let r = list_set(r, k, r[k] + ga_blade_sign(i, j) * ai * bj)
end
end
let j = j + 1
end
end
let i = i + 1
end
return r
end
Before building on it, the algebra is checked against its own defining identities, including associativity and the null-vector properties used below:
Step 2 — conformal points, directions, translators
With e∞ = e- + e+ and e0 = (e- - e+)/2 (so e∞² = e0² = 0, e∞·e0 = -1):
- a point is the null vector
P = x e1 + y e2 + z e3 + ½|p|² e∞ + e0 - a vector (free direction) is the bivector
v ∧ e∞ - a translation by
vis the versorT = 1 − ½ v e∞, applied asT X T̃
make a function called cga_einf returns mv
return [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
end
make a function called cga_e0 returns mv
return [0,0,0,0,0,0,0,0,-1/2,0,0,0,0,0,0,0,1/2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
end
# The Euclidean 3-vector x e1 + y e2 + z e3.
make a function called cga_evec takes x, y, z returns mv
return [0, x, y, 0, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
end
# weighted conformal point: weight w at (x/w, y/w, z/w) -- the null vector for w = 1
make a function called cga_embed takes x, y, z, w returns p
let a = (x * x + y * y + z * z) / (2 * w)
return [0, x, y, 0, z, 0, 0, 0, a - w / 2, 0, 0, 0, 0, 0, 0, 0, a + w / 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
end
make a function called cga_point takes x, y, z returns mv
return cga_embed(x, y, z, 1)
end
# the direction (x,y,z) as the bivector v ^ einf = sum x_i (e_i e+ + e_i e-)
make a function called cga_direction takes x, y, z returns mv
return [0, 0, 0, 0, 0, 0, 0, 0, 0, x, y, 0, z, 0, 0, 0, 0, x, y, 0, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
end
make a function called cga_translator takes x, y, z returns mv
let v_einf = ga_gp(cga_evec(x, y, z), cga_einf())
return ga_sub(ga_scalar(1), ga_scale(v_einf, 1/2))
end
# Extract the Euclidean x,y,z of a point (grade-1 e1,e2,e3 coefficients) or
# of a direction (the e_i ^ e+ coefficients).
make a function called cga_x takes a returns v
return a[1] + a[9]
end
make a function called cga_y takes a returns v
return a[2] + a[10]
end
make a function called cga_z takes a returns v
return a[4] + a[12]
end
# Homogeneous weight: -(einf . a), the scalar part of einf a. 1 for a unit
# point, 0 for a direction.
make a function called cga_weight takes a returns w
return a[16] - a[8]
end
The book's w becomes the homogeneous weight -(e∞ · t): 1 for a point,
0 for a direction.
Step 3 — the API
The operations every later page needs on points and directions (make one, add, subtract, negate, scale, measure, dot and cross) set the API:
make a function called tuple takes x, y, z, w returns t
if w == 0 then
return cga_direction(x, y, z)
end
return cga_embed(x, y, z, w)
end
make a function called point takes x, y, z returns t
return cga_point(x, y, z)
end
make a function called vector takes x, y, z returns t
return cga_direction(x, y, z)
end
make a function called get_x takes t returns v
return cga_x(t)
end
make a function called get_y takes t returns v
return cga_y(t)
end
make a function called get_z takes t returns v
return cga_z(t)
end
make a function called get_w takes t returns v
return cga_weight(t)
end
make a function called is_point takes t returns ok
return equal(get_w(t), 1)
end
make a function called is_vector takes t returns ok
return equal(get_w(t), 0)
end
make a function called tuple_eq takes a, b returns ok
return equal(get_x(a), get_x(b)) and equal(get_y(a), get_y(b)) and equal(get_z(a), get_z(b)) and equal(get_w(a), get_w(b))
end
# translation by sign * v. The sandwich T P ~T with the translator of cga.patlang
# (tuple_translate_ga, the definition) moves a weighted point (x, y, z, w) to
# (x + w dx, y + w dy, z + w dz, w): written out here, because the sandwich is two full
# 32 x 32 geometric products and every point + vector in the tracer goes through it.
# the test tree (foundations/tuples/arithmetic/translate) checks the two against each other.
make a function called tuple_translate takes p, v, sign returns t
let w = p[16] - p[8]
if w == 0 then
return p
end
return cga_embed(get_x(p) + w * sign * get_x(v), get_y(p) + w * sign * get_y(v), get_z(p) + w * sign * get_z(v), w)
end
# Directions (weight 0) are by far the commonest operand: their e+ and e- coefficients
# agree, and they are just (x, y, z). Adding, scaling and negating them is done on those
# three numbers instead of looping over all 32 coefficients; every other tuple takes the
# generic route (the ga_ functions are the definition; the test tree (foundations/tuples/arithmetic/direction_fast) checks
# the shortcuts against them bit for bit).
make a function called tuple_add takes a, b returns t
let wa = a[16] - a[8]
let wb = b[16] - b[8]
if wa == 0 and wb == 0 then
return cga_direction(get_x(a) + get_x(b), get_y(a) + get_y(b), get_z(a) + get_z(b))
end
if equal(wa, 1) and equal(wb, 0) then
return tuple_translate(a, b, 1)
end
if equal(wa, 0) and equal(wb, 1) then
return tuple_translate(b, a, 1)
end
return ga_add(a, b)
end
make a function called tuple_sub takes a, b returns t
let wa = a[16] - a[8]
let wb = b[16] - b[8]
if wa == 0 and wb == 0 then
return cga_direction(get_x(a) - get_x(b), get_y(a) - get_y(b), get_z(a) - get_z(b))
end
if equal(wa, 1) and equal(wb, 1) then
return cga_direction(get_x(a) - get_x(b), get_y(a) - get_y(b), get_z(a) - get_z(b))
end
if equal(wa, 1) and equal(wb, 0) then
return tuple_translate(a, b, -1)
end
return ga_sub(a, b)
end
make a function called tuple_neg takes a returns t
if a[16] == a[8] then
return cga_direction(0 - get_x(a), 0 - get_y(a), 0 - get_z(a))
end
return ga_neg(a)
end
make a function called tuple_mul takes a, s returns t
if a[16] == a[8] then
return cga_direction(get_x(a) * s, get_y(a) * s, get_z(a) * s)
end
return ga_scale(a, s)
end
make a function called tuple_div takes a, s returns t
let k = 1 / s
if a[16] == a[8] then
return cga_direction(get_x(a) * k, get_y(a) * k, get_z(a) * k)
end
return ga_scale(a, k)
end
# Euclidean 3-vector part of a tuple, as a GA vector.
make a function called tuple_evec takes t returns v
return cga_evec(get_x(t), get_y(t), get_z(t))
end
# the inner product of the Euclidean parts plus the product of the weights
make a function called dot takes a, b returns d
return get_x(a) * get_x(b) + get_y(a) * get_y(b) + get_z(a) * get_z(b) + get_w(a) * get_w(b)
end
make a function called magnitude takes t returns m
return sqrt(dot(t, t))
end
make a function called normalize takes t returns n
return tuple_div(t, magnitude(t))
end
# a x b = -I (a ^ b), I = e1 e2 e3
make a function called cross takes a, b returns v
let i3 = ga_blade(7, 1)
let w = ga_neg(ga_gp(i3, ga_outer(tuple_evec(a), tuple_evec(b))))
return cga_direction(w[1], w[2], w[4])
end
Notable mappings:
| Usual form | Here |
|---|---|
point + vector |
translator sandwich T P T̃ |
point - point |
(P₁ − P₂) ∧ e∞ |
dot(a, b) |
scalar part of the geometric product of the Euclidean parts, plus w·w |
cross(a, b) |
−I (a ∧ b), I = e1 e2 e3 |
Arithmetic is exact rational: sqrt of a perfect square is exact, so most
checks compare with ==. Only float inputs and some square roots need a tolerance
(1e-5).
Step 4 — checks
Because a tuple is a whole multivector, the tests check the algebra itself rather than
four numbers read back: a point is built the fast way and from the basis, and both must
agree; points are null vectors; a translated point is exactly the target point; p − q
is exactly (P − Q) ∧ e∞; directions are untouched by translation; distinct tuples
compare unequal.
Step 5 — Putting it together: the projectile
# Throw a ball from a ledge two units up and follow it until it lands.
# Position update is a translator sandwich; gravity/wind accumulate as
# direction bivectors.
include "../lib/tuple.patlang"
include "../lib/spec.patlang"
make a function called tick takes env, proj returns next
let position = tuple_add(proj[0], proj[1])
let velocity = tuple_add(tuple_add(proj[1], env[0]), env[1])
return [position, velocity]
end
let p = [point(0, 2, 0), normalize(vector(3, 2, 0))]
let e = [vector(0, -3/40, 0), vector(-1/50, 0, 0)]
let ticks = 0
while get_y(p[0]) > 0 do
let p = tick(e, p)
let ticks = ticks + 1
print("tick " + ticks + ": x=" + get_x(p[0]) + " y=" + get_y(p[0]))
end
print("landed after " + ticks + " ticks")
> v2_interp.exe examples/ch01_projectile.patlang
tick 1: x=0.8320502943378437 y=2.5547001962252294
tick 2: x=1.6441005886756872 y=3.034400392450458
tick 3: x=2.4361508830135308 y=3.439100588675687
tick 4: x=3.2082011773513743 y=3.7688007849009164
tick 5: x=3.960251471689218 y=4.023500981126146
tick 6: x=4.692301766027062 y=4.203201177351375
tick 7: x=5.404352060364905 y=4.3079013735766045
tick 8: x=6.096402354702749 y=4.3376015698018335
tick 9: x=6.768452649040593 y=4.292301766027062
tick 10: x=7.420502943378437 y=4.172001962252292
tick 11: x=8.05255323771628 y=3.976702158477521
tick 12: x=8.664603532054123 y=3.70640235470275
tick 13: x=9.256653826391966 y=3.361102550927979
tick 14: x=9.82870412072981 y=2.9408027471532083
tick 15: x=10.380754415067655 y=2.4455029433784374
tick 16: x=10.912804709405497 y=1.8752031396036664
tick 17: x=11.42485500374334 y=1.2299033358288955
tick 18: x=11.916905298081184 y=0.5096035320541247
tick 19: x=12.388955592419029 y=-0.28569627172064616
landed after 19 ticks
An independent check of the landing tick: y(n) = 2 + n·2/√13 − (3/40)·n(n−1)/2
gives y(18) = 0.51 and y(19) = −0.29, matching the output above.
Matrix Transformations
The book's translation, rotation, scaling and shearing are 4×4 matrices typed in from a table. Here the first two are versors of the conformal algebra, and their matrices are computed from them. Scaling and shearing are not versors, and this page says why.
Step 1 — translation and rotation are versors
A versor V acts on any conformal tuple X by the sandwich V X Ṽ.
- Translation by
v:T = 1 − ½ v e∞(already used in Points, directions and motions in the conformal algebra to add a vector to a point). - Rotation by
rin the plane of a unit bivectorB:R = cos(r/2) − sin(r/2) B, withB = e2e3about x,e3e1about y,e1e2about z.
The 4×4 matrix of a versor is read off by letting it act on the four
homogeneous basis tuples (the directions e1 e2 e3 and the origin) and writing
each image's (x, y, z, w) as a column. Nothing about the matrix is typed in.
# matrix whose columns are given as four [x, y, z, w] lists
make a function called columns_matrix takes cols returns m
let m = []
let r = 0
while r < 4 do
let row = []
let c = 0
while c < 4 do
let row = list_push(row, cols[c][r])
let c = c + 1
end
let m = list_push(m, row)
let r = r + 1
end
return m
end
make a function called tuple_column takes t returns col
return [get_x(t), get_y(t), get_z(t), get_w(t)]
end
# 4x4 matrix of the map X -> V X ~V on homogeneous coordinates
make a function called versor_matrix takes v returns m
let basis = [vector(1, 0, 0), vector(0, 1, 0), vector(0, 0, 1), point(0, 0, 0)]
let cols = []
let j = 0
while j < 4 do
let cols = list_push(cols, tuple_column(ga_sandwich(v, basis[j])))
let j = j + 1
end
return columns_matrix(cols)
end
make a function called translation takes x, y, z returns m
return versor_matrix(cga_translator(x, y, z))
end
# cos(r/2) - sin(r/2) B for B = e_a e_b (blade mask given, sign = +1/-1)
make a function called rotor takes r, mask, sign returns rt
let half = r / 2
return ga_sub(ga_scalar(cos(half)), ga_blade(mask, sign * sin(half)))
end
make a function called rotor_x takes r returns rt
return rotor(r, 6, 1)
end
make a function called rotor_y takes r returns rt
return rotor(r, 5, -1)
end
make a function called rotor_z takes r returns rt
return rotor(r, 3, 1)
end
make a function called rotation_x takes r returns m
return versor_matrix(rotor_x(r))
end
make a function called rotation_y takes r returns m
return versor_matrix(rotor_y(r))
end
make a function called rotation_z takes r returns m
return versor_matrix(rotor_z(r))
end
The book's remark that a translation matrix "ignores" vectors needs no special
construction: a direction is the bivector v ∧ e∞, and the translator sandwich
leaves it unchanged. The test suite checks that on the full 32-component
multivector (Points, directions and motions in the conformal algebra), and again here through the matrix.
Step 2 — scaling and shearing are linear maps
A versor preserves lengths and angles, so no versor scales one axis by 2 and
another by 3, or shears. These are linear maps, specified by the images of
e1, e2, e3 (the matrix columns) and extended to all blades as an
outermorphism. The determinant is the wedge of the three image vectors —
det(scaling(2,3,4)) = 24 comes out of (2e1) ∧ (3e2) ∧ (4e3).wedge of images gives volume change
Reflection is the book's "scaling by a negative value". In the algebra it is
the reflection versor −n X n; the tests confirm the two agree.
# Linear map given by the images of e1, e2, e3 (each an [x, y, z] list);
# points and directions both transform, the origin stays put.
make a function called linear_matrix takes i1, i2, i3 returns m
return columns_matrix([[i1[0], i1[1], i1[2], 0], [i2[0], i2[1], i2[2], 0], [i3[0], i3[1], i3[2], 0], [0, 0, 0, 1]])
end
make a function called scaling takes x, y, z returns m
return linear_matrix([x, 0, 0], [0, y, 0], [0, 0, z])
end
# shearing(xy, xz, yx, yz, zx, zy): "xy" = x moves in proportion to y.
make a function called shearing takes xy, xz, yx, yz, zx, zy returns m
return linear_matrix([1, yx, zx], [xy, 1, zy], [xz, yz, 1])
end
Step 3 — checks
Translation, scaling (including a mirror), rotation about each axis (quarter turns carry one axis onto the next, a sixth of a turn worked by hand, turns add and keep distances), the six shears, and the order in which several are applied, each with its inverse.
Step 4 — oracles that share no code with the implementation
Points worked by hand only check a handful of cases. The rest of the tests pin down the construction itself:
- each matrix equals the standard explicit matrix (so deriving the matrix from the versor reproduces the usual table, entry for entry);
matrix * pequals the versor sandwich applied directly to the conformal point, compared on all 32 components;inverse(rotation_x(r))(the matrix inverse of Matrices) equals the matrix of the reversed rotor — for a unit versor the inverse is the reverse;- determinants: translation and rotation 1, scaling the product of its factors, reflection −1; translations compose by adding, same-axis rotations by adding angles;
- a negative control (
rotation_x(0.3) ≠ rotation_y(0.3)).
Step 5 — Putting it together: a clock
Twelve o'clock is point(0, 0, 1). Hour h is that point rotated about the y
axis by h·π/6. Each mark is scaled by 3/8 of the canvas width, moved to the
centre, and drawn as a 5×5 block so it is visible. The canvas y axis points
down, so the z coordinate is subtracted from the centre row (twelve is at the
top).
# Chapter 4, "Putting It Together": the twelve hour marks of a clock, each
# found by rotating the twelve o'clock point about the y axis with a rotor
# (via its rotation matrix), and drawn on a canvas.
include "../lib/spec.patlang"
include "../lib/png.patlang"
include "../lib/transform.patlang"
let size = 400
let c = canvas(size, size)
let radius = size * 3 / 8
let centre = size / 2
let white = color(1, 1, 1)
let twelve = point(0, 0, 1)
let h = 0
while h < 12 do
let hour = mat_tuple(rotation_y(h * pi() / 6), twelve)
let px = floor(centre + radius * get_x(hour) + 1/2)
let py = floor(centre - radius * get_z(hour) + 1/2)
print("hour " + h + ": world (" + get_x(hour) + ", " + get_z(hour) + ") pixel (" + px + ", " + py + ")")
let dy = -2
while dy <= 2 do
let dx = -2
while dx <= 2 do
write_pixel(c, px + dx, py + dy, white)
let dx = dx + 1
end
let dy = dy + 1
end
let h = h + 1
end
save_png(c, "../out/ch04_clock.png")
print("wrote out/ch04_clock.png")
> cd examples && v2_interp.exe ch04_clock.patlang
hour 0: world (0, 1) pixel (200, 50)
an index is an int or a modint, not a float

Verifying the image independently
.NET decodes the PNG, and a separate script recomputes every mark from plain
sin and cos (no matrices, no algebra) and checks the pixel there:
> powershell.exe -NoProfile -File tools/verify_clock.ps1 out/ch04_clock.png
decoded by .NET: 400x400; lit pixels: 300 (12 marks x 25 = 300 expected); hour marks not at the sin/cos position: 0
How it is checked
> v2_interp.exe tests/run.patlang --node foundations/algebra --depth 2
[ ok ] The conformal algebra Cl(4,1)
[ ok ] Basis vectors square to the metric
[ ok ] e1, e2, e3 and e+ square to +1
[ ok ] e- squares to -1
[ ok ] Distinct basis vectors anticommute (all 20 ordered pairs)
[ ok ] Products and their laws
[ ok ] The geometric product is associative (dense exact multivectors)
[ ok ] The geometric product distributes over addition
[ ok ] For vectors, ab = a.b + a^b
[ ok ] A vector wedged with itself is zero
[ ok ] Reversion turns a product round: rev(ab) = rev(b) rev(a)
[ ok ] A unit Euclidean bivector squares to -1
[ ok ] The two null vectors of the conformal model
[ ok ] e-infinity squares to zero
[ ok ] e-origin squares to zero
[ ok ] Their inner product is -1
[ ok ] The scalar part of a product (all, giving the same answer)
[ ok ] naive: the scalar coefficient of the full 32x32 product
[ ok ] faster: only same-blade terms (32 products)
[ ok ] The inner product of two vectors (all, giving the same answer)
[ ok ] naive: scalar part of the full product
[ ok ] faster: five products with the metric signs
[ ok ] The sign of a blade squared (all, giving the same answer)
[ ok ] the general sign of a product of two blades
[ ok ] the shorter rule for a blade times itself
[ ok ] Two multivectors are equal when every coefficient is, to 1e-5
checks: 19 passed, 0 failed, 0 blocked, 0 skipped, 0 not run
ALL PASSED
> v2_interp.exe tests/run.patlang --node foundations/tuples --depth 2
[ ok ] Points and directions
[ ok ] Making them
[ ok ] A point (all, giving the same answer)
[ ok ] A direction (all, giving the same answer)
[ ok ] Coordinates and the weight read back
[ ok ] A point is a null vector: P.P = 0
[ ok ] tuple(x, y, z, w) is a weighted point
[ ok ] Different points, and a point and a direction, are not equal
[ ok ] Arithmetic
[ ok ] Point plus direction is the moved point
[ ok ] Point minus point is the direction between them
[ ok ] p - q is exactly (P - Q) wedged with einf
[ ok ] Adding then subtracting a direction gives the point back
[ ok ] Directions add, negate, scale and divide component by component
[ ok ] A translation leaves a direction alone
[ ok ] Moving a tuple along a direction (all, giving the same answer)
[ ok ] Direction arithmetic (all, giving the same answer)
[ ok ] Lengths, angles and products
[ ok ] Lengths of directions with whole-number lengths
[ ok ] Scaling a direction scales its length
[ ok ] A normalised direction has length 1 and the same heading
[ ok ] Normalising (2,3,6) gives sevenths exactly
[ ok ] The dot product: worked values and symmetry
[ ok ] The dot product of tuples counts the weights too
[ ok ] x cross y = z, y cross z = x, z cross x = y
[ ok ] The cross product is perpendicular to both and changes sign when swapped
[ ok ] The distance between points read from P.Q
[ ok ] Reflecting a direction in a surface
[ ok ] Reflection keeps the length, flips the normal part, and undoes itself
[ ok ] A direction going down and along bounces up off a floor
[ ok ] Two ways to reflect (all, giving the same answer)
checks: 31 passed, 0 failed, 0 blocked, 0 skipped, 0 not run
ALL PASSED
> v2_interp.exe tests/run.patlang --node foundations/transforms --depth 2
[ ok ] Transformations
[ ok ] Translation
[ ok ] Moves points, leaves directions, and its inverse moves back
[ ok ] Scaling
[ ok ] Stretches points and directions; its inverse shrinks
[ ok ] Scaling by -1 along an axis is a mirror
[ ok ] Rotation
[ ok ] A quarter turn about each axis carries one axis onto the next
[ ok ] A sixth of a turn about z, worked by hand
[ ok ] Rotations keep distances and have determinant 1
[ ok ] Two turns about one axis make one turn by the sum
[ ok ] The inverse of a turn is the turn backwards
[ ok ] Shearing
[ ok ] Each of the six shears moves one coordinate in proportion to another
[ ok ] One shear keeps volume (determinant 1); a mixed shear has the determinant worked out by hand
[ ok ] Doing several in turn
[ ok ] Applying one after another equals applying their product, rightmost first
[ ok ] Motions as versors of the algebra (all, giving the same answer)
[ ok ] naive: the written-out matrices
[ ok ] the algebra: the rotor or translator sandwich on the point
[ ok ] Placing the eye
[ ok ] The view sends the eye to the origin, the target down -z, up up
[ ok ] Looking down -z from the origin changes nothing; looking down +z turns round
[ ok ] A view with up at right angles to the gaze (all, giving the same answer)
[ ok ] The matrix of a versor does to tuples what the sandwich does
[ ok ] The frame rotor turns the axes onto a given right-handed frame
[ ok ] Further checks, independent of the code they check
[ ok ] ---- oracles beyond the book ----
[ ok ] Translation matrix * p = translator sandwich on the conformal point
[ ok ] Det(translation) = 1
checks: 22 passed, 0 failed, 0 blocked, 0 skipped, 0 not run
ALL PASSED
Graduate Attributes
Modelled on this page
- Subject Specialist: Conformal geometric algebra is applied to define points, directions and transformations for a renderer.
- Researcher: Implementation results are verified against independent hand calculations and separate scripts.
- Critical Thinker: The distinction between versors and linear maps is used to explain why scaling and shearing are handled differently.
University of Reading Graduate Attributes framework.