CGA Worked Examples: Interval Arithmetic in Conformal Space
8.1 The Conformal Embedding
CGA, developed in modern form by Hestenes, Li, and Rockwood[1], adds two extra basis vectors \(\mathbf{e}_+\) and \(\mathbf{e}_-\) to the Euclidean basis, with metric:
\[ \mathbf{e}_+^2 = +1, \quad \mathbf{e}_-^2 = -1, \quad \mathbf{e}_i^2 = +1 \; (i=1\ldots n) \]Two null vectors are defined from these:
\[ \mathbf{e}_\infty = \mathbf{e}_- + \mathbf{e}_+ \quad (\text{point at infinity}), \qquad \mathbf{e}_o = \tfrac{1}{2}(\mathbf{e}_- - \mathbf{e}_+) \quad (\text{origin}) \]They satisfy \(\mathbf{e}_\infty^2 = 0\), \(\mathbf{e}_o^2 = 0\), \(\mathbf{e}_\infty \cdot \mathbf{e}_o = -1\). A Euclidean point \(\mathbf{x} \in \mathbb{R}^n\) is embedded as the null vector:
\[ X = \mathbf{x} + \tfrac{1}{2}|\mathbf{x}|^2 \mathbf{e}_\infty + \mathbf{e}_o \]Every embedded Euclidean point \(X\) satisfies \(X^2 = 0\). This is not a coincidence — it is the defining property of the conformal embedding. When we apply interval arithmetic, a set of possible Euclidean points maps to a set of null blades, forming an interval null blade.
8.2 Geometric Primitives as Blades
The power of CGA is that all standard geometric objects become blades of specific grades, and all geometric operations become sandwich products with the same algebraic form.[2]
\(X = \mathbf{x} + \tfrac{1}{2}|\mathbf{x}|^2\mathbf{e}_\infty + \mathbf{e}_o\)
\(P_1 \wedge P_2\) — oriented segment between two points
\(P_1 \wedge P_2 \wedge P_3\) — circle through three points
(line when one point is \(\mathbf{e}_\infty\))
\(P_1 \wedge P_2 \wedge P_3 \wedge P_4\) — sphere through four points
(plane when one is \(\mathbf{e}_\infty\))
Alternatively, a sphere of radius \(r\) centred at \(\mathbf{c}\) is the grade-1 blade:
\[ S = \mathbf{c} + \tfrac{1}{2}(|\mathbf{c}|^2 - r^2)\mathbf{e}_\infty + \mathbf{e}_o \]A point \(X\) lies on sphere \(S\) iff \(X \cdot S = 0\). The signed distance \(X \cdot S\) measures how far inside or outside the sphere \(X\) lies — it is precisely the \(F(P)\) of Chapter IV's bisection algorithm, now expressed as a single inner product.
════════════════════════════════════════════════════════ WORKED EXAMPLE 1 ════════════════════════════════════════════════════════Suppose a sensor reports position \(\mathbf{x} = (x_1, x_2)\) with bounded error: \(x_1 \in [1.8, 2.2]\), \(x_2 \in [0.9, 1.1]\). We embed this interval into CGA and track how the uncertainty propagates into the null blade's coefficients.
The embedding formula is \(X = \mathbf{x} + \tfrac{1}{2}|\mathbf{x}|^2 \mathbf{e}_\infty + \mathbf{e}_o\). The interval version bounds each coefficient independently:
\[ X_1\text{-coeff} \in [1.8, 2.2], \quad X_2\text{-coeff} \in [0.9, 1.1] \] \[ \tfrac{1}{2}|\mathbf{x}|^2 \in \tfrac{1}{2}([1.8,2.2]^2 + [0.9,1.1]^2) \]| Given | \(x_1 \in [1.8, 2.2], \quad x_2 \in [0.9, 1.1]\) | sensor uncertainty |
| Step 1 | \(x_1^2 \in [3.24, 4.84]\) | squaring an interval |
| Step 2 | \(x_2^2 \in [0.81, 1.21]\) | squaring an interval |
| Step 3 | \(|\mathbf{x}|^2 \in [4.05, 6.05]\) | summing the squares |
| Step 4 | \(\tfrac{1}{2}|\mathbf{x}|^2 \in [2.025, 3.025]\) | \(\mathbf{e}_\infty\) coefficient — interval wider than inputs |
| Result | \(X = [1.8,2.2]\mathbf{e}_1 + [0.9,1.1]\mathbf{e}_2 + [2.025,3.025]\mathbf{e}_\infty + \mathbf{e}_o\) | interval null blade |
Note the wrapping amplification: the \(\mathbf{e}_\infty\) coefficient has a width of \(1.0\), wider than either input interval (widths \(0.4\) and \(0.2\)). This is an instance of the dependency problem — \(|\mathbf{x}|^2 = x_1^2 + x_2^2\) involves the same uncertain quantities \(x_1, x_2\) twice. Affine arithmetic (Chapter I, Ref. [5]) reduces this over-approximation.
The nonlinearity of the CGA embedding amplifies uncertainty in the \(\mathbf{e}_\infty\) coefficient quadratically. For a region centred at \(\mathbf{x}_0\) with radius \(\varepsilon\), the \(\mathbf{e}_\infty\) coefficient width is \(O(|\mathbf{x}_0|\varepsilon)\). Near the origin the amplification is small; far from the origin it grows. This motivates centering the embedding at the region's midpoint.
A sphere (or circle in 2D) of radius \(r\) centred at \(\mathbf{c}\) is represented in CGA as the grade-1 blade:
\[ S = \mathbf{c} + \tfrac{1}{2}(|\mathbf{c}|^2 - r^2)\mathbf{e}_\infty + \mathbf{e}_o \]With uncertain centre \(\mathbf{c} = ([c_1^-, c_1^+], [c_2^-, c_2^+])\) and uncertain radius \(r \in [r^-, r^+]\), we propagate the interval through the formula. The critical term is \(|\mathbf{c}|^2 - r^2\), whose range involves subtraction of two interval squares.
Concrete values: \(\mathbf{c} = (3.0 \pm 0.1,\, 0.0)\), \(r \in [1.8, 2.2]\).
| Given | \(c_1 \in [2.9,3.1],\; c_2 \in [0,0],\; r \in [1.8,2.2]\) | |
| Step 1 | \(c_1^2 \in [8.41,9.61],\; c_2^2 = 0\) | interval squaring |
| Step 2 | \(|\mathbf{c}|^2 \in [8.41, 9.61]\) | |
| Step 3 | \(r^2 \in [3.24, 4.84]\) | squaring radius interval |
| Step 4 | \(|\mathbf{c}|^2 - r^2 \in [8.41-4.84,\; 9.61-3.24] = [3.57,\; 6.37]\) | interval subtraction — range 2.8 |
| Result S | \(S = [2.9,3.1]\mathbf{e}_1 + [1.785,3.185]\mathbf{e}_\infty + \mathbf{e}_o\) | \(\tfrac{1}{2}[3.57,6.37]\) |
The \(|\mathbf{c}|^2 - r^2\) term mixes two uncertain quantities with opposite signs, leading to interval cancellation. When \(|\mathbf{c}| \approx r\) (sphere nearly passing through the origin), this term is near zero and its relative interval width explodes. In practice one should use higher-precision arithmetic or switch to the outer product sphere construction \(P_1 \wedge P_2 \wedge P_3 \wedge P_4\) in such configurations.
A point \(X\) lies on sphere \(S\) iff \(X \cdot S = 0\). The signed value \(X \cdot S\) measures signed distance: negative inside, positive outside. With interval inputs, we compute the interval \([X \cdot S]\) and use its sign to determine guaranteed incidence.
Setup: sphere \(S\) centred at \((3, 0)\), radius \(2\) (exact). Point \(X\) at \((1.0 \pm 0.3, 0.5 \pm 0.2)\). Is \(X\) definitely inside, definitely outside, or ambiguous?
| Sphere S | \(S = 3\mathbf{e}_1 + \tfrac{1}{2}(9-4)\mathbf{e}_\infty + \mathbf{e}_o = 3\mathbf{e}_1 + 2.5\mathbf{e}_\infty + \mathbf{e}_o\) | exact blade |
| Point X | \(x_1\in[0.7,1.3],\; x_2\in[0.3,0.7]\) | interval inputs |
| Embed X | \(X = [0.7,1.3]\mathbf{e}_1 + [0.3,0.7]\mathbf{e}_2 + \tfrac{1}{2}([0.49,1.69]+[0.09,0.49])\mathbf{e}_\infty + \mathbf{e}_o\) | |
| \(\quad = [0.7,1.3]\mathbf{e}_1 + [0.3,0.7]\mathbf{e}_2 + [0.29,1.09]\mathbf{e}_\infty + \mathbf{e}_o\) | ||
| X·S | \(X\cdot S = -\tfrac{1}{2}(X\cdot S + S\cdot X)\) | inner product in CGA |
| \(\quad= -\tfrac{1}{2}(2x_1\cdot 3 + 2x_2\cdot 0 - 2\cdot 2.5 \cdot |\mathbf{x}|^2/2 \cdot 0 - 1\cdot 1)\) | expanding CGA inner product | |
| \(\quad = x_1 \cdot (-3) + \tfrac{1}{2}|\mathbf{x}|^2 - \tfrac{1}{2}|\mathbf{c}|^2 + \tfrac{1}{2}r^2\) | simplifying | |
| \(\quad = \tfrac{1}{2}|\mathbf{x} - \mathbf{c}|^2 - \tfrac{1}{2}r^2\) | signed distance formula | |
| Distance² | \(|\mathbf{x}-\mathbf{c}|^2 = (x_1-3)^2 + x_2^2 \in [(-2.3)^2+(0.3)^2,\; (-1.7)^2+(0.7)^2] = [5.38, 3.38]\) | |
| \(\quad\Rightarrow |\mathbf{x}-\mathbf{c}|^2 \in [2.98, 5.38]\) | after correcting min/max | |
| X·S | \(X\cdot S = \tfrac{1}{2}[2.98,5.38] - 2 \in [-0.51, 0.69]\) | straddles zero → ambiguous |
If \([X\cdot S]\) is strictly negative → point definitely inside the sphere.
If \([X\cdot S]\) is strictly positive → point definitely outside.
If \([X\cdot S]\) straddles zero → ambiguous: bisect the point interval or the sphere interval.
This three-way classification is the foundation of robust inside/outside testing in interval-arithmetic
ray tracers and collision detection systems.
In CGA, translation by a vector \(\mathbf{t}\) is implemented as a sandwich product with the translator versor:
\[ T = 1 - \tfrac{1}{2}\mathbf{t}\,\mathbf{e}_\infty, \qquad X' = T\,X\,\tilde{T} \]When the displacement \(\mathbf{t}\) is uncertain — \(t_1 \in [t_1^-, t_1^+]\), \(t_2 \in [t_2^-, t_2^+]\) — we obtain an interval translator. Applying it to a point propagates both the point's uncertainty and the translator's uncertainty into the output.
Setup: translate the exact point \((1,0)\) by uncertain displacement \(t_1 \in [1.9, 2.1]\), \(t_2 \in [-0.1, 0.1]\).
| Point X | \(X = \mathbf{e}_1 + \tfrac{1}{2}\mathbf{e}_\infty + \mathbf{e}_o\) | exact: x=(1,0) |
| Translator | \(T = 1 - \tfrac{1}{2}([1.9,2.1]\mathbf{e}_1 + [-0.1,0.1]\mathbf{e}_2)\mathbf{e}_\infty\) | interval versor |
| Result X' | \(X' = T\,X\,\tilde{T}\) | sandwich product |
| \(= (1+t_1)\mathbf{e}_1 + t_2\mathbf{e}_2 + \tfrac{1}{2}|(1+t_1, t_2)|^2\mathbf{e}_\infty + \mathbf{e}_o\) | translated null vector | |
| x₁' | \(1 + t_1 \in [2.9, 3.1]\) | linear: width preserved |
| x₂' | \(t_2 \in [-0.1, 0.1]\) | linear: width preserved |
| e∞ coeff | \(\tfrac{1}{2}([2.9,3.1]^2 + [-0.1,0.1]^2) \in [4.21, 4.81]\) | nonlinear: width grows |
The remarkable fact is that the linear parts of the CGA coordinates (the \(\mathbf{e}_1\) and \(\mathbf{e}_2\) components of \(X'\)) carry the translation exactly: their widths equal the translator's widths. Only the nonlinear \(\mathbf{e}_\infty\) component inflates. This means that for operations that only read the linear coordinates (e.g., extracting the Euclidean position), the translator introduces no extra interval wrapping.
Unlike rotation (which mixes coordinates nonlinearly even for exact angles), translation in CGA is linear in the Euclidean coordinates. This means the Euclidean width of the output equals the Euclidean width of the input, with no dependency-problem inflation. The \(\mathbf{e}_\infty\) inflation is irrelevant if only Euclidean position is extracted — confirming that CGA is well-suited to interval-based kinematic tracking.
A circle through three points \(P_1, P_2, P_3\) is the grade-3 blade:
\[ C = P_1 \wedge P_2 \wedge P_3 \]When each point is uncertain — lying within a small disc — the resulting circle blade is an interval blade. The diagram below shows this interactively: drag the uncertainty radius slider to grow each point's disc and observe how the resulting circle's interval widens.
The outer product \(P_1 \wedge P_2 \wedge P_3\) is trilinear in its arguments — each extra uncertain input multiplies the uncertainty. The width of the circle blade grows as \(O(\varepsilon)\) for small \(\varepsilon\) (where \(\varepsilon\) is the point uncertainty), but the proportionality constant depends on the triangle's geometry: nearly collinear configurations produce near-null blades and large relative uncertainty. This is the CGA analogue of the tangency condition from Chapter III.
8.3 Ruby Implementation of CGA Primitives
We extend the Multivector from Chapter VI with a CGA module providing
the embedding, sphere constructor, translator, and inner-product incidence test.
8.4 CGA Usage Examples in Ruby
Practical note on CGA metric. In the implementation above we use
the Euclidean metric for the \(\mathbf{e}_1, \mathbf{e}_2\) basis vectors. The full
CGA metric also requires \(\mathbf{e}_3^2 = +1\) and \(\mathbf{e}_4^2 = -1\). The
canonical_product method in Chapter VI's Multivector assumes
all basis vectors square to \(+1\); to handle CGA correctly, pass a metric:
array (e.g. [1,1,1,-1]) to override the sign for basis vector \(\mathbf{e}_4\).
References
- (2001). New algebraic tools for classical geometry. In G. Sommer (Ed.), Geometric Computing with Clifford Algebras. Springer, 3–26.
- (2007). Geometric Algebra for Computer Science. Morgan Kaufmann. Chapters 13–15 (conformal model).
- (2009). Geometric Algebra with Applications in Engineering. Springer. §4 (CGA and versors).
- (2008). Geometric Algebra for Computer Graphics. Springer. Chapters 10–11.
- (2004). Affine arithmetic: concepts and applications. Numerical Algorithms 37(1–4), 147–158. (Reducing dependency-problem inflation in nonlinear embeddings.)
- (2013). Foundations of Geometric Algebra Computing. Springer. §5 (conformal model computational details).