# Multiellipsoidal Mapping Algorithm
## 2 Mathematical Background
### Hyperconformal Geometric Algebra  
The most used GA is perhaps the Conformal Geometric Algebra (CGA) for the 3D case \(\mathbb{G}_{4,1}\), where the algebraic signature is \((4,1,0)\), and its extension to n-dimensions \(\mathbb{G}_{n+1,1}\) to represent the \(\mathbb{R}^{n}\) vector space. In this algebra, it is possible to represent points, pairs of points, lines, planes, circles and spheres. Many algorithms for robotics and machine vision [19], e.g., finding path planning algorithms [14], pose estimation [15], structure extraction from motion [16], geometric entity detection [6; 7], and robotic mapping algorithms [8; 9], have been developed with this algebra.  
However, to use more complex geometric entities as algebra elements, other algebras must be used. The GA \(\mathbb{G}_{6,3}\)[20] is a generalization of \(\mathbb{G}_{4,1}\), in which such geometric entities like ellipsoids, planes, pair of planes, pseudocylinders, spheres and others deformed quadratic surfaces can be represented as multivectors. In [10], \(\mathbb{G}_{6,3}\) was extended to any dimension in the so-called Hyperconformal GA (HGA) with a notation \(\mathbb{G}_{2n,n}\) for representing the vector space \(\mathbb{R}^{n}\). This algebra is constructed by using a homogeneous stereographic projection in (3) over every coordinate. Figure 1 describes a graphical representation of the projection.  
The null basis are related to (3) by \(e_{0}=e_{+}+e_{-}\) and \(e_{\infty}=e_{+}-e_{-}\) and they have the property \(e_{0}^{2}=e_{\infty}^{2}=0\). Given a three-dimensional space with basis \((e_{x},e_{y},e_{z})\), the previous notation must be extended. Consider that the stereographic projection is applied in every axis, e.g., the null basis of the coordinate \(e_{x}\) are denoted with \(e_{0x}\) and \(e_{\infty x}\).  
\[x_{c}=2\frac{x}{x^{2}+1}e_{1}+\frac{x^{2}-1}{x^{2}+1}e_{+}+e_{-}=xe_{1}+\frac{ 1}{2}x^{2}e_{\infty}+e_{0} \tag{3}\]  
Hence, the entities in \(\mathbb{G}_{6,3}\) can be calculated using the null basis. Let \(x=p_{x}e_{x}+p_{y}e_{y}+p_{z}e_{z}\) be a point in \(\mathbb{R}^{3}\), the its representation in \(\mathbb{G}_{6,3}\) is denoted by \(X\) as is shown in (4), where \(e_{i\infty}\) is the point  
Figure 1: Homogeneous stereographic projection.  
at infinity in the \(i\) homogeneous stereographic projection and \(e_{0}=1/3(e_{0x}+e_{0y}+e_{0z})\) is the point at zero.  
\[X=p_{x}e_{x}+p_{y}e_{y}+p_{z}e_{z}+\frac{1}{2}(p_{x}^{2}e_{0x}+p_{y}^{2}e_{0 xy}+p _{z}^{2}e_{0 xz})+e_{0} \tag{4}\]  
In \(\mathbb{G}_{6,3}\), \(H\) denotes a 1-vector that represents an fixed-axes ellipsoid with center \((c_{x},c_{y},c_{z})\) and semiaxis \((r_{x},r_{y},r_{z})\), as can be seen in (5), where \(e_{\infty}=e_{0 zz}+e_{0y}+e_{0z}\).  
\[E=\frac{c_{x}}{r_{x}^{2}}e_{x}+\frac{c_{y}}{r_{y}^{2}}e_{y}+\frac{c_{z}}{r_{z} ^{2}}e_{z}+\frac{1}{2}\left(\frac{c_{x}^{2}}{r_{x}^{2}}+\frac{c_{y}^{2}}{r_{y} ^{2}}+\frac{c_{z}^{2}}{r_{z}^{2}}-1\right)e_{\infty}+\frac{1}{r_{x}^{2}}e_{0x} +\frac{1}{r_{y}^{2}}e_{0y}+\frac{1}{r_{z}^{2}}e_{0z} \tag{5}\]  
These notations are different from the ones shown in [20], but already presented in [10]. Other geometric entities are derived from the ellipsoid, as shown in Table 1. In Section 3, this theory is used to develop the optimization of the ellipsoidal surfaces.