Abstract
Using the classification of Clifford algebras and Bott periodicity, we show how higher geometric algebras can be realized as matrices over classical low dimensional geometric algebras. This matrix representation allows us to use standard geometric algebra software packages more easily. As an example, we express the geometric algebra for conics (GAC) as a matrix over the Compass ruler algebra (CRA).
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
In recent years, applications of geometric algebras have developed rapidly, as evidenced by the surveys on the topic (Hitzer et al., [3, 15, 19]). However, fundamental software tools (Hadfield et al., [12], Sangwin et al., [31]) for implementing geometric algebras are not yet ready to meet this growing demand in higher signatures. One such example is the geometric algebra for conics (GAC) (Hrdina et al., [21, 22]). GAC is a current and essential research topic in the field, as evidenced by the numerous publications on its applications (Derevianko et al., [4,5,6] and Esquivel at al., [10]).
To address this gap, we show how to use the classification of Clifford algebras and Bott periodicity to implement higher algebras effectively. To meet the needs of the GA community, we present working scripts that allow existing Python software packages [12] to work with the GAC algebra. In the case of GAC, we have implemented the necessary procedures in the form of the python package bootGAC and all of them are available online. Our procedures are designed specifically for GAC, but the ideas can be generalized to work with algebras of higher signatures.
Note that some software tools assume or even partially implement Bott periodicity. We mention Chris Doran package SimpleGA for Julia, [7]. Also, Rafal Ablamovicz developed his very well-known Maple package Clifford for dimension max 8, assuming a matrix extension, [1].
2 Panorama of geometric algebras
The concept of geometric algebras (GA) is generally associated with applications of Clifford algebras in physics, and more recently in engineering. David Hestenes’ pioneering work Space-time algebra (STA) is considered to be the first use of the concept, [13]. The term GA can refer to either Clifford algebras or a specific instance or variation of them. We will attempt to clarify the meaning of GA in this context.
Generally, a Clifford algebra \(\mathcal Cl(p,q,r)\) is an unit, distributive and associative factor algebra generated by a vector space \(\mathbb V\) over a field \(\mathbb K\). The vector space \(\mathbb V\) is equipped with a quadratic form Q with signature (p, q, r) and the ideal is generated by the identity
where the product on the left is that of the algebra, and the 1 is its multiplicative identity. If we replace the quadratic form Q with the corresponding bilinear form B we rewrite the identity (1) as
and we can see that Clifford algebras are not commutative, [28]. Finally, in the chosen basis \(\{e_1, \dots e_{p+q+r}\}\) of \(\mathbb V\) we received a set of well-known identities
Thanks to the geometric product on \(\mathcal Cl(p,q,r)\), we can obtain the underlying Grassmannian algebra \(\mathcal Gr(p,q,r)\) using the expression
where a is a vector and \(B_k = e_{j_k}\cdots e_{j_1}\), \(e_j \in \{1,\dots p+q+r \}\), [29]. Note that the first non-trivial instances of Clifford algebras \(\mathcal {C}_{0,1,0} = \langle 1,e_1 \ | \ e_1^2=-1\rangle \), \(\mathcal {C}_{1,0,0} = \langle 1,e_1 \ | \ e_1^2=1\rangle \) and \(\mathcal {C}_{0,0,1} = \langle 1,e_1 \ | \ e_1^2=0\rangle \) are the complex numbers \(\mathbb C\), paracomplex numbers \(\mathbb P\) and dual numbers \(\mathbb D\) respectively.
In Clifford algebras, the subspace of bivectors (elements of the second grade) is closed under a Lie bracket and forms a Lie algebra. Generally, the algebra of bivectors of the Clifford algebra \(\mathcal Cl(p,q,r)\) corresponds to a Lie algebra \(\mathfrak {so}(p,q,r)\). The symmetry group (due the Klein Erlangen program, [30]) of the chosen geometry can then be written as a subgroup of the Lie group \(Spin(p,q,r) = \exp (\mathfrak {so}(p,q,r))\).
Special cases of Clifford algebras are algebras with a positive definite signature (n, 0, 0); these algebras are called vector geometric algebras (VGA) and denoted as \(\mathbb G_n\). Their elements form the Grassmann algebra \(\mathcal Gr(n, \mathbb R)\) and the set of bivectors corresponds to the special orthogonal Lie algebra \(\mathfrak {so}(n)\), [24, 28].
If the Clifford algebra is not a VGA, then we deal with a Clifford algebra based on bilinear form with an indefinite signature and the affine Lie algebra \(\mathfrak {aff}(n)\) is a subalgebra of the Lie algebra \(\mathfrak {so}(p,q,r)\) in these cases. We will speak about n-dimensional confromal geometric algebra \(\mathcal Cl(n+1,1,0)\). This Clifford algebra contains a subalgebra of signature (n, 0, 1) directly or with the help of tensor product
where the inclusion in the expression (2) can be written in the coordinates with the help of the null-cone in \(\mathcal Cl(1,1,0)\). The tensor product \(\mathcal Cl(n,0,0) \otimes \langle 1, e_0\rangle \), where \(e_0\) belongs to the null-cone, is isomorphic to \(\mathcal Cl(n,0,1)\). The set of bivectors of this subalgebra, together with the Lie bracket, is isomorphically equivalent to the affine Lie algebra \(\mathfrak {aff}(n)\) and its exponents to the spin affine group (double cover of the affine group), i.e a semidirect product of Spin(n) and \(\mathbb R^n\). As an additional, we choose an embedding \(\iota : \mathbb R^n \rightarrow \mathcal Cl(p,q,r)\) which is equivariant with respect to the action of this group.
2.1 Projective geometric algebra
The first nontrivial possibility is the projective (sometimes called plane-based) geometric algebra (PGA), [9]. It is a Clifford algebra \(\mathcal Cl({3,0,1})\) based on the quadratic form of signature (3, 0, 1). The bivectors of this algebra correspond directly to the affine Lie algebra \(\mathfrak {aff}(3)\) and its exponents to the spin affine group, which can be seen as a semidirect product \(Spin(3) \rtimes \mathbb R^3\). The origin is represented by the blade \(o=e_1 \wedge e_2 \wedge e_3\) and the inclusion of \(\mathbb R^3\) by the map
The corresponding algebra of the bivectors is a whole Lie affine algebra \(\mathfrak {aff}(3)\), so PGA is a geometric algebra corresponding to the affine geometry on \(\mathbb R^3\) and it is a powerful tool for geometric reasoning, and for solving problems in physics and engineering, [29].
2.2 Conformal geometric algebra
The second very well-known GA is conformal geometric algebra (CGA), [8, 16]. It is a Clifford algebra \(\mathcal Cl({4,1}):=\mathcal Cl({4,1,0})\), where the corresponding affine subalgebra \(\mathfrak {aff}(3)\) is an algebra generated by the span \(\langle e_1,e_2,e_3,e_{\infty }:= e_4+e_5 \rangle \). The origin is a vector \(e_0 = \frac{1}{2}(e_4-e_5)\), where the pair \(e_0\) and \(e_{\infty }\) is so called Witt pair. Finally, the inclusion of \(\mathbb R^3\) is a map
The corresponding algebra of all bivectors is a conformal Lie algebra \(\mathfrak {co}(n)= \mathfrak {aff}(n)\oplus \mathbb R \), which makes CGA a geometric algebra corresponding to conformal geometry on \(\mathbb R^3\).
We can use the scalar product to represent the geometric objects in the following way. A general vector in the CGA in terms of our basis is of the form
where \(v_{\alpha } \in \mathbb R, \ \alpha \in \{1,2,3,0,\infty \}\) and its inner product with an embedded point is then given by
The element v can represent geometric objects based on monoms 1, x, y, z and \(x^2+y^2+z^2\), so the planes
if \(v_{0}=0\) and spheres if \(v_{0} < 0\), and finally the objects of the property \(v_{0} > 0\) are sometime called imaginary spheres. In the algebra CGA, the linearization of spherical objects takes place, which is successfully used, for example, in inverse kinematics, [11, 20, 25].
The key property is that the scalar product is invariant concerning the action of the affine group, so the following identity holds:
where \(\iota \) is the inclusion map and T is an affine transformation. This means that the \(T \iota (x,y,z) \tilde{T}\) represents the same object as \(\iota (x,y,z)\), mapped by the affine transformation. Finally, let’s note that the flat objects of PGA forms a subalgebra in CGA, [23].
2.3 2d-Up CGA (CGA with one more Witt pair)
Projective geometric algebra (PGA) and conformal geometric algebra (CGA) are the cornerstones of GA theory. GA can be further extended in a conformal way by adding a new pair of orthonormal generators, \(\tilde{e}_+\) and \(\tilde{e}_-\), such that \(\tilde{e}_+^2=1\) and \(\tilde{e}_-^2=-1\). This pair of generators can be used to define two additional generators, \(\tilde{e}_0=\frac{1}{2}(\tilde{e}_+-\tilde{e}_-)\) and \(\tilde{e}_{\infty }=\tilde{e}_++ \tilde{e}_-\), which are called the new Witt pair.
Thanks to the new Witt pair \(\tilde{e}_0\) and \(\tilde{e}_{\infty }\), the Lie algebra of a bivector contains two isomorphic affine Lie algebras \(\mathfrak {aff_1}:=\langle e_1,e_2,e_3,e_{\infty } \rangle \) and \(\mathfrak {aff_2}:=\langle e_1,e_2,e_3,\tilde{e}_{\infty } \rangle \) and therefore the corresponding affine Lie groups \(A_1 = Spin(3) \rtimes \mathbb R^3\) and \(A_2=Spin(3) \rtimes \tilde{\mathbb R}^3\). Moreover, we have a bivector \(e_{\infty }\tilde{e}_{\infty }\) and related versors \(W=\exp (\beta e_{\infty }\tilde{e}_{\infty })=1-\frac{1}{2} ( \beta e_{\infty }\tilde{e}_{\infty } ) \). These versors preserve the vector space \(\wedge ^1=\langle e_1,e_2,e_2,e_0,e_{\infty }, \tilde{e}_0, \tilde{e}_{\infty } \rangle \) by sandwich product \(W {x} \tilde{W}\), where \(x \in \wedge ^1 \).
Our goal is to represent a new class of appropriate geometric objects \(\mathcal O \subset \mathbb R^3\) as a general vectors
such that \(\mathcal O = \{ x \in \mathbb R^3 |\iota (x) \cdot v =0 \}\), where \(\iota : \mathbb R^3 \rightarrow \mathcal Cl(5,2)\) is a chosen embedding. So our goal is to find the embedding \(\iota : \mathbb R^3 \rightarrow \mathcal Cl(5,2)\) and the group of Euclidean transformations so that the vectors representing the chosen geometric objects are equivariant with respect to the action of this group. We are looking for an analogous CGA situation where the group of Euclidean transformations (5) preserves the space of spheres and planes (4) with the help of inclusion (3).
First, let’s say that \(A_1 \cap A_2 = Spin(3)\) and therefore, new transformations arise thanks to the translational part of the group \(A_2\) and W. Let’s see how the two affine groups \(A_1\) and \(A_2\) act on the conformal embedding \(\iota \) (3) and on a new Witt pair \(\langle \tilde{e}_{0},\tilde{e}_{\infty } \rangle \).
-
The Lie group \(A_1\) acts on \(\iota (x_1,x_2,x_3)\) as usual.
-
The translation part \(T_2\) of \(A_2\) acts on \(\iota (x_1,x_2,x_3)\) in the following way
$$\begin{aligned}&\left( 1-\frac{1}{2} u_ie_i\tilde{e}_{\infty } \right) \iota (x_1,x_2,x_3) \left( 1+\frac{1}{2} u_i e_i\tilde{e}_{\infty } \right) = \iota (x_1,x_2,x_3) + u_i x_i \tilde{e}_{\infty }, \end{aligned}$$ -
The Lie group \(A_1\) acts on a new Witt pair \(\langle \tilde{e}_{0},\tilde{e}_{\infty } \rangle \) as an identity.
-
The translation part \(T_2\) of \(A_2\) acts on \(\langle \tilde{e}_{\infty } \rangle \) as an identity and on \(\langle \tilde{e}_{0} \rangle \) as CGA inclusion of the second copy of CGA
$$\iota _2 (x,y,z) = \tilde{e}_0 + x e_1+y e_2 + z e_3 + (x^2+y^2+z^2) \tilde{e}_{\infty } $$
The new versor W acts on \(\iota (x_1,x_2,x_3)\) in the following way
and on \(\langle \tilde{e}_{\infty } \rangle \) as an identity. With the help of composition the vector of the new embedding
can be map to the vector \(\iota (x_1,x_2,x_3) + (\delta - \beta + u_i x_i ) \tilde{e}_{\infty }\) by versor \(T_2 \circ W\). This new dimension (parameter \(\delta \)) can be used, for example, to add the monom \(\frac{1}{2}x^2\tilde{e}_{\infty } \) into inclusion (7) and the versors \(T_i\) and W can be used as new generators of the translation group in the following way:
where \(T_1=1-\frac{1}{2}(\alpha e_{\infty } e_1)\), \(W=1+\frac{1}{2} \alpha ^2 e_{\infty } \tilde{e}_{\infty } \) and \(T_2=1-\frac{1}{2}(2 \alpha \bar{e}_{\infty } e_1)\). Now, a general vector in this algebra in terms of our basis is of the form
where \(\tilde{v}_{\infty },\tilde{v}_0\), \(v_{\alpha } \in \mathbb R, \ \alpha \in \{1,2,3,0,\infty \}\) and its inner product with an embedded point is then given by
and may represent a special kind of ellipsoids. Rotations in this case, make sense only in the case of spheres (\(\delta =0\)) otherwise, they do not preserve the class of defined objects (special kind of ellipsoids). This procedure gives us an algebra \(\mathcal Cl(4,2)\) not yet intensively studied.
2.4 A natural flag \(\mathbb G_n \subset PGA_n \subset CGA_n \)
In the previous chapters, we introduced PGA and CGA separately. This is due to the historical fact that these algebras have been developed separately concerning applications. But the conceptual point of view is as follows. If we want to work with the n-dimensional Euclidean space \(\mathbb R^n\), we choose the geometric algebra \(\mathbb G_n\). By adding one Witt pair \(\{e_0,e_{\infty } \}\), we obtain the n-dimensional CGA and the n-dimensional PGA is given as its subalgebra of flat objects, [23].
2.5 2d-Up STA
Note that the flag structure discussed in Section 2.4 has a relativistic counterpart. We can interpret the algebra \(\mathcal {C}l(2,4)\) as a conformal extension of the space-time algebra (STA) [13], meaning it is a Clifford algebra of the vector space with a bilinear form of signature (1,3) that permits conformal transformations. This algebra is sometimes referred to as 2d-Up STA or conformal STA (CSTA). It has intristing applications in mathematical physics [26] and is implemented, for example, in the Julia package SimpleGA [7].
As with the Euclidean metric, it may be more efficient to work exclusively with flat objects, thereby using the PGA subalgebra. This approach can also be beneficial for the conformal space-time algebra (CSTA), resulting in the algebra of signature \(\mathcal {C}l(1,4)\), known as 1d-Up STA, [27]. Thus, we obtain the flag structure \({STA} \subset ``\text {1d-Up}\ STA'' \subset ``\text {2d-Up}\ STA''\) for Minkowski’s signature.
2.6 Geometric algebra for conics
Generally, we can add more Witt pairs with this procedure. For example, this gives us the well known geometric algebra for conics (GAC), [21] which can be seen as a Compass ruler algebra (CRA) (the 2D version of CGA), [17, 18] with two additional Witt pairs. GAC has three copies of the two dimensional affine algebras \(\mathfrak {aff}_i(2), \ i=1,2,3\) based on the three Witt pairs \(\{e_0, e_{\infty } \}\), \(\{\tilde{e}_0, \tilde{e}_{\infty } \}\) and \(\{\bar{e}_0, \bar{e}_{\infty } \}\) respectively. In addition, we have a three dimensional commutative Lie algebra with bivectors \(\langle e_{\infty } \tilde{e}_{\infty },e_{\infty } \bar{e}_{\infty },\bar{e}_{\infty } \tilde{e}_{\infty } \rangle \) which we can freely use. This algebra allows us to linearize up to three monoms in \(\mathbb R^2\), if the inclusion of \(\mathbb R^2\) is the map
as usual and the general vector in this algebra in terms of our basis is of the form
where \(\bar{v}_{\infty },\bar{v}_0\), \(\tilde{v}_{\infty },\tilde{v}_0\), \(v_{\alpha } \in \mathbb R, \ \alpha \in \{1,2,3,0,\infty \}\) then its inner product with an embedded point is given by
and represents an arbitrary conics section.
To find the appropriate affine group, we have considered three classes of translation versors \(T_{ij}\) and three new versors based on Witt pairs \(W_j\) at our use:
In the same way as in Section 2.3 we can set parameters \(\alpha _i\) and \(\beta _i\) to implement the translation subgroup equivariant with respect to the inclusion \(\iota \).
In GAC, it makes sense to discuss rotations and thus obtain the whole Affine group equivariant with respect to the inclusion \(\iota \). The CGA rotor \(R_+ = \cos (\frac{\psi }{2}) + \sin (\frac{\psi }{2}) e_1 \wedge e_2\) acts as an identity on \(\langle \tilde{e}_{\infty }, \bar{e}_{\infty } \rangle \), but we still have not used bivectors \(\bar{e}_0 \wedge \tilde{e}_{\infty }\) and \( \bar{e}_{\infty } \wedge \tilde{e}_{0}\). Concerning [21], we state that rotation is represented by the bivector’s
and \(\exp (\psi r)\) can be seen in the form \(R_+ (R_1 \wedge R_2)\), where
So we can say that the algebra constructed in this way allows you to work efficiently with conics, [4,5,6].
2.7 Geometric algebra for quadrics
Another natural possibility is to find a geometric algebra realizing quadrics. Each quadric can be written with the help of monoms
\( \{ 1,x,y,z,x^2,y^2,z^2,xy,xz,yz\}.\) If we want to follow the same procedure as in the case of GAC we have to extend the geometric algebra \(\mathbb G_3\) by six Witt pairs \(\{ e_{0i},e_{\infty i}\}, \ i=1,\dots 6\) (or the geometric algebra CGA by five Wit pairs). The inclusion \(\iota : \mathbb R^3 \rightarrow \mathcal Cl(9,6) \) can be chosen, for example, as
To find the translation, we consider a Lie group \(\mathcal V\) of versors generated by elements
and we’re just looking for the versors \(T_{x_0,y_0,z_0} \in \mathcal V\) which are the solutions of the equations
For the rotation, we proceed similarly with help of versors \(R_+ = \exp (e_ie_j), R_{ij}= \exp (e_{0i} e_{\infty j})\). This geometric algebra is sometimes called quadric CGA (QCGA) (Hitzer et al. [2, 14]).
2.8 Final remark
By this procedure, we can implement any class of geometric objects and see them as linear objects in a Clifford algebra of the right dimension.
3 Bott periodicity
In the following, we show how GA can be realized in a suitable matrix algebra. The complete classification of Clifford algebras is based on advanced concepts of linear algebra and algebraic geometry, [28]. Important for us are the following identities which are valid for Clifford algebras generally
where \(M_2 ( \mathcal Cl (p,q))\) are \(2 \times 2\) matrices over Clifford algebra \(\mathcal Cl (p,q)\). These identities are based on the general theory and the aforementioned considerations lead to the following classical description of the Boot periodicity
In view of these considerations, for example, the algebra \(\mathcal Cl(4,2)\) of the signature (4, 2) can be viewed as an algebra of \(2 \times 2\) matrices over CRA, ie. the algebra \(\mathcal Cl(3,1)\) of the signature (3, 1).
3.1 Algebra GAC realized as matrices over CRA
Our goal is to realize and consequently implement the automorphism \(\Psi \) based on (89) between the GAC and the corresponding matrices over CRA
An algebra \(\mathcal {C}l(5,3)\) is formed by a set of orthogonal generators
CGA \(e_1,e_2,e_+,e_-\) and two orthogonal couples of pairs \(\tilde{e}_-,\tilde{e}_+\) and \(\bar{e}_-,\bar{e}_+\) satisfying the following identities
Theorem 3.2
Let \(\mathcal {C}l(5,3)\) be a Clifford algebra based on the signature (5, 3) and \(M_4(\mathcal {C}l(3,1))\) be an algebra of \(4 \times 4\) matrices over Clifford algebra \(\mathcal {C}l(3,1)\). Let \(e_i, \ i \in \{1,2,+,-\}\) and \(\tilde{e}_+,\tilde{e}_-,\bar{e}_+,\bar{e}_-\) be an orthogonal basis of \(\mathcal {C}l(5,3)\) and \(N,F_+,F_-,G_+,G_-\) be the following \(4\times 4\) matrices over \(\mathbb R\)
Then the map \(\Psi : \mathcal {C}l(5,3) \rightarrow M_4(\mathcal {C}l(3,1))\) generated by
is an isomorphism of Clifford algebras.
Proof
The map \(\Psi \) is a linear mapping between vector spaces. From Bott’s periodicity, we know that these two algebras are isomorphic. So it suffices to show that the resulting matrices satisfy the identities of the generators of the Clifford algebra. This property, together with the universal property of Clifford algebras, completes the proof. Thus, we show that the matrices satisfy the required identities. By straightforward calculation, it can be shown that
The matrices \(E_i\) correspond to the algebra \(\mathcal {C}l(3,1)\) and matrix N commute with others matrices. Again by direct calculation, it is easily shown that the matrices \(F_+,F_-,G_+\) and \(G_-\) commute with each other, which completes the proof. \(\square \)
Now we will show how our considerations can be used in a practical way in computing with the GAC algebra. In this algebra there are both points and conics represented by vectors
in the Witt basis, where \(e_\infty = e_- + e_+, e_0 = {1 \over 2}( e_- - e_+), \, \tilde{e}_\infty = \tilde{e}_- + \tilde{e}_+, \tilde{e}_0 = {1 \over 2}( \tilde{e}_- - \tilde{e}_+), \, \bar{e}_\infty = \bar{e}_- + \bar{e}_+, \bar{e}_0 = {1 \over 2}( \bar{e}_- - \bar{e}_+)\). We can see the GAC vectors (points, conics) as a matrices of a form
where \(\textbf{s} = k_1e_1 + k_2e_2 + k_3 e_\infty + k_4 e_0\). Due to the isomorphisms \(\Psi \) in the Theorem 3.2, we can realize the wedge product and the scalar product between vector \(\textbf{u}\) of the form (610) and vector \(\textbf{v}\) of the form
with help of matrix multiplication on the matrices (11) as follows
where
and \(I_d\) is identity matrix of order 4.
3.2 Remark on higher algebras
In Sections 2.3, 2.5 and 2.6 we have shown how to construct algebras that can work with additional monoms by adding Witt pairs. In the \(\iota \) embedding, we can represent these monoms and in the IPNS representation we get a wider class of objects. For example, if we start with the CGA algebra in the case of quadrics (Section 2.6), we need five more monoms to describe an arbitrary quadric. Each Witt pair then leads to a new signature, and the resulting algebra can then be represented by matrices over the previous algebra. In the case of QCGA therefore we work with \(32 \times 32\) matrices over the CGA. Of course, if we want to use GA for example for real time calculation we have to choose a deeper implementation. However, the proposed apparatus allows relatively easy implementation of any geometric algebra with the use of suitable software allowing to work with PGA and CGA algebras which are widely available nowadays.
4 Geometric objects and the python realisations
We aim to allow the GA community to work with the high-order algebras, and therefore we have created the corresponding software packages bootGAC for algebra GAC. The algebra \(\mathcal {C}l(5,3)\) is implemented in Python with the Numpy and Clifford packages, [12]. The Clifford package allows working with CGA objects, including those of subalgebra CRA, and the Numpy package allows working with matrices, including CGA matrices. Even matrix multiplication and scalar multiplication work internally like multiplication on the algebra CGA. This allows for straightforward implementation of the algebra \(\mathcal {C}l(5,3)\) as the algebra \(M_4(\mathcal {C}l(3,1))\). To demonstrate the implementation, we present matrix representations of geometric objects such as points and conics, taking the \(\mathcal {C}l(5,3)\) representations of the objects from [21]. A general point with coordinates x, y
where \(\textbf{p}_{cra} = xe_1+y_2 + {1 \over 2}(x^2 + y^2)e_\infty + e_0\).
A general parabola is given by vertex u, v, semi-latus rectum parameter p and rotation \(\theta \). An ellipse and a hyperbola are given by center u, v, semi-axis lengths a, b and rotation \(\theta \). An element \(\textbf{c}\) of the form
represents a parabola if \(\alpha = -1\) and
The element \(\textbf{c}\) (16) represents an ellipse or a hyperbola, if
and \(\textbf{c}\) is an ellipse if
and \(\textbf{c}\) is a hyperbola if
According to Eq. (11), the representations of the conics (16) are of the form
4.1 Python implementation
The key to our approach is to use the existing software (Python) packages for handling CGA. These packages are common and have continuous support provided by the users and software developers. The following imports are needed for implementation.
Next we have to download new routines bootGAC and import them into the head of the code;
The chosen conics sections can now be entered in the form of matrices over the GAC using the defined procedures, For example a general parabola given by parameters u, v, p and \(\theta \) can be created using the following procedure
where E1, E2, Einf, E0, F0, G0 are numpy representations of matrices \(E_1, E_2, E_0: = \Psi (e_0), E_\infty : = \Psi (e_\infty ), F_0: = \Psi (\tilde{e}_0)\) and \( G_0: = \Psi (\bar{e}_0)\). Now, a general ellipse, resp. hyperbola given by parameters u, v, a, b and \(\theta \) can be created using procedures
A general vector and a general point can be represented similarly. The wedge of two general vectors can be computed using a procedure
Analogously, a function can be created for the inner product. It can be noticed that the wedge function uses matrix multiplication using the Numpy package on matrices of the CGA objects. Selection of implemented procedures are listed in Table 1.
4.2 Displaying
The Pyganja package was used as the displaying tool, as this package supports the Clifford package. It is therefore easy to display planar and conformal objects, i.e. lines, circles, etc. It is therefore necessary to use these objects to display conics. An ellipse is uniquely determined, for example, by its incircle, circumcircle and major axis, a hyperbola is uniquely determined by its asymptotes and focuses. The conic section itself can then be plotted discretely point by point, but the plotting can be more time-consuming. In the sample examples, we use a combination of these approaches - the conic section itself is plotted point by point, for the hyperbola the asymptotes are also displayed, for the ellipse the axes, the incircle and the circumcircle are displayed.
5 Examples
In this chapter we use a series of examples to demonstrate and illustrate how the package bottGA works.
5.1 Initialization and plotting an ellipse and a hyperbola
First we show how to use the bootGA package to create objects. For a particular ellipse and hyperbola based on coefficients \(a = 5\), \(b = 3\), \(\theta =\frac{\pi }{3}\) and \((u,v)=(4,-3)\) (and \(a=1, b = \frac{2}{3}, \theta = \frac{\pi }{5}, (u,v)= (3.5, -2.5)\) respectively), the corresponding matrices (1718) are following
where \(\textbf{s} =e_0+4.28 e_1 - 3.92 e_2 + 11.1 e_{\infty } \) and \(\textbf{t}=e_0+12.5 e_1 - 13.16 e_2 + 28.78 e_{\infty }\). In the Fig. 1 both objects are plotted by the procedure draw of package Pyganja and the corresponding code is as follows
5.2 Translation of an ellipse and a hyperbola
In order to perform the translations we have to initialize the objects and versors. Initialization of an ellipse and a hyperbola is based on the code
and the initialization of the translator and its conjugate translator given by vector \(\textbf{t} = 2e_1 + 7e_2\) is based on the code
Numerically, it gives the matrices
where
\(\textbf{t} = 1 - e_{1\infty } - {7 \over 2}e_{2\infty }\), | \(\tilde{\textbf{t}} = 1 + e_{1\infty } + {7 \over 2}e_{2\infty }\), |
\(\textbf{k} = -2e_1 + 7e_2 + 14e_{12\infty }\), | \(\tilde{\textbf{k}} = 2e_1 - 7e_2 + 14e_{12\infty }\), |
\(\textbf{s} = -7e_1 - 2e_2 + {45 \over 2}e_{12\infty }\), | \(\tilde{\textbf{s}} = 7e_1 + 2e_2 + {45 \over 2}e_{12\infty }\), |
\(\textbf{r} = -28-53e_{12} + 28e_{1\infty } + 98e_{2\infty }\), | \(\tilde{\textbf{r}} = 28-53e_{12} + 28e_{1\infty } + 98e_{2\infty }\). |
The specific translation is then performed by conjugation using the following code
Finally, the effect can be displayed using the following code and seen in Fig. 2
5.3 Rotation of an ellipse and a parabola
Next, we illustrate the rotation of the objects, again first introducing the objects and the motor. Initialization of an ellipse and a parabola is based on the code
Initialization of the rotor and its conjugate rotor given by angle \({2 \over 5}\pi \) is based on the code
The rotation of the objects is based on the code
and we can see them in Fig. 3 with the help of the code
5.4 Finding a conic by 5 points
With the help of the developed procedures we can also define the conics sections using the set of points that lie on it. Initialization of points and finding the conic is based on the code
The result can be displayed in the Fig. 4 using the code
Initialization of the points lying on a parabola with the help of the code
and finding appropriate conics by the code
we can find the parabola as we can see in the Fig. 5.
6 Conclusion
Our goal was to bring algebras of higher orders, especially GAC, [21] into the current framework by the most natural way. In order to achieve this, we considered the Bott periodicity [28] and we obtained an explicit description of the conics in the form of matrices over the CRA algebra. We have used this representation for creating scripts in the most frequently used software tool, the Python packages Clifford and Pyganja, [12]. All implemented procedures of the bootGAC package can be found online, including the mentioned examples.
Data availability
All implemented procedures of the bootGAC package can be openly available at https://github.com/MarStodola/bootGAC, including the mentioned examples.
References
Ablamowicz, R., Fauser, B.: Mathematics of Clifford - a Maple package for Clifford and Graßmann algebras. Adv. Appl. Clifford Algebras 15, 157–181 (2005). https://doi.org/10.1007/s00006-005-0009-9
Breuils, S., Nozick, V., Sugimoto, A., Hitzer, E.: Quadric conformal geometric algebra of \(\mathbb{R} ^{9,6}\). Adv. Appl. Clifford Algebras 28(35), 1–16 (2018)
Breuils, S., Tachibana, K., Hitzer, E.: New applications of Clifford’s geometric algebra. Adv. Appl. Clifford Algebras 32, 17 (2022). https://doi.org/10.1007/s00006-021-01196-7
Byrtus, R., Derevianko, A., Vašík, P.: Outline of tube elbow detection based on GAC. In: Magnenat-Thalmann, N., et al. (eds.) Advances in Computer Graphics. CGI 2020. Lecture Notes in Computer Science, vol 12221. Springer, Cham (2020) https://doi.org/10.1007/978-3-030-61864-3_41
Derevianko, A., Vašík, P.: Solver-free optimal control for linear dynamical switched system by means of geometric algebra. Math. Meth. Appl. Sci. (2022). https://doi.org/10.1002/mma.8752
Derevianko, A., Loučka, P.: Search for similarity transformation between image point clouds using geometric algebra for conics. In: Mazal, J., et al. (eds.) Modelling and Simulation for Autonomous Systems. MESAS 2021. Lecture Notes in Computer Science, vol. 13207. Springer, Cham (2022) https://doi.org/10.1007/978-3-030-98260-7_13
Doran, Ch.: SimpleGA. A lightweight Geometric Algebra library, GitHub repository, (2023) https://github.com/MonumoLtd/SimpleGA.jl
Dorst, L., Fontijne, D., Mann, S.: Geometric Algebra for Computer Science: An Object-Oriented Approach to Geometry. Morgan Kaufmann Publishers Inc. (2007)
Dorst, L., De Keninck, S.: A Guided Tour to the Plane-Based Geometric Algebra PGA (2022)
Esquivel, J.C.Z.: Vanishing vector rotation in quadric geometric algebra. Adv. Appl. Clifford Algebras 32, 46 (2022). https://doi.org/10.1007/s00006-022-01234-y
Hadfield, H., Wei, L., Lasenby, J.: The forward and inverse kinematics of a delta robot. In: Magnenat-Thalmann N. et al. (eds.) Advances in Computer Graphics. CGI 2020. Lecture Notes in Computer Science, vol. 12221. Springer, Cham (2020) https://doi.org/10.1007/978-3-030-61864-3_38
Hadfield, H., Wieser, E., Arsenovic, A., Kern, R.: pygae/clifford, Zenodo, https://doi.org/10.5281/zenodo.1453978
Hestenes, D.: Space-Time Algebra, 2nd edn. Birkhäuser, Basel (2015)
Hitzer, E.: Three-dimensional quadrics in conformal geometric algebras and their versor transformations. Adv. Appl. Clifford Algebras 29, 46 (2019). https://doi.org/10.1007/s00006-019-0964-1
Hitzer, E., Lavor, C., Hildenbrand, D.: Current survey of Clifford geometric algebra applications. Math. Meth. Appl. Sci. (2022). https://doi.org/10.1002/mma.8316
Hildenbrand, D.: Foundations of Geometric Algebra Computing. Springer Science & Business Media, Berlin (2013)
Hildenbrand, D., Hrdina, J., Návrat, A., Vašík, P.: Local controllability of snake robots based on CRA, theory and practice. Adv. Appl. Clifford Algebras (2020). https://doi.org/10.1007/s00006-019-1022-8
Hildenbrand, D.: Introduction to Geometric Algebra Computing. CRC Press, Taylor & Francis Group (2019)
Hitzer, E., Kamarianakis, M., Papagiannakis, G., Vašík, P.: Survey of new applications of geometric algebra. Math. Meth. Appl. Sci. (2023). https://doi.org/10.1002/mma.9575
Hrdina, J., Návrat, A.: Binocular computer vision based on conformal geometric algebra. Adv. Appl. Clifford Algebras 27(3), 1945–1959 (2017). https://doi.org/10.1007/s00006-017-0764-4
Hrdina, J., Návrat, A., Vašík, P.: Geometric algebra for conics. Adv. Appl. Clifford Algebras (2018). https://doi.org/10.1007/s00006-018-0879-2
Hrdina, J., Návrat, A., Vašík, P.: Fitting in geometric algebra setting. Adv. Appl. Clifford Algebras (2019). https://doi.org/10.1007/s00006-019-0989-5
Hrdina, J., Návrat, A., Vašík, P., Dorst, L.: Projective geometric algebra as a subalgebra of conformal geometric algebra. Adv. Appl. Clifford Algebras (2021). https://doi.org/10.1007/s00006-021-01118-7
Kanatani, K.: Understanding geometric algebra: Hamilton, Grassmann, and Clifford for computer vision and graphics. CRC Press, Boca Raton (2015)
Kleppe, A., Egeland, O.: Inverse kinematics for industrial robots using conformal geometric algebra. Model. Identif. Control 37(1), 63–75 (2016)
Lasenby, A.: Conformal Geometry and the Universe, preprint (2005)
Lasenby, A.: Recent applications of conformal geometric algebra. In Computer Algebra and Geometric Algebra with Applications, pp. 298-328. Springer (2004)
Lounesto, P.: Clifford Algebra and Spinors, 2nd edn. CUP, Cambridge (2006)
Perwass, Ch.: Geometric Algebra with Applications in Engineering, 1st edn. Springer Verlag, Berlin (2009)
Sharpe, R., Shiing-shen Ch.: Differential Geometry: Cartan’s Generalization of Klein’s Erlangen Program, Graduate Texts in Mathematics, Springer-Verlag New York (1997)
Sangwine, S.J., Hitzer, E.: Clifford Multivector Toolbox (for MATLAB). Adv. Appl. Clifford Algebras 27(1), 539–58 (2016). https://doi.org/10.1007/s00006-016-0666-x
Acknowledgements
We wish to confirm that there are no known conflicts of interest associated with this publication. We declare Credit authorship contribution statement as: Marek Stodola: Writing original draft, Investigation, Software implementation. Jaroslav Hrdina: Conceptualization, Methodology.
Funding
Open access publishing supported by the National Technical Library in Prague. Supported by the Grant No. FSI-S-23-8161.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This article is part of the Topical Collection on Proceedings ICCA 23, Holon, 2023, edited by Uwe Kaehler and Maria Elena Luna-Elizarraras.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Stodola, M., Hrdina, J. Higher Order Geometric Algebras and Their Implementations Using Bott Periodicity. Adv. Appl. Clifford Algebras 34, 44 (2024). https://doi.org/10.1007/s00006-024-01346-7
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00006-024-01346-7