Calculating the Rotor Between Conformal Objects

In this paper we will address the problem of recovering covariant transformations between objects—specifically; lines, planes, circles, spheres and point pairs. Using the covariant language of conformal geometric algebra (CGA), we will derive such transformations in a very simple manner. In CGA, rotations, translations, dilations and inversions can be written as a single rotor, which is itself an element of the algebra. We will show that the rotor which takes a line to a line (or plane to a plane etc) can easily be formed and we will investigate the nature of the rotors formed in this way. If we can recover the rotor between one object and another of the same type, a useable metric which tells us how close one line (plane etc) is to another, can be a function of how close this rotor is to the identity. Using these ideas, we find that we can define metrics for a number of common problems, specifically recovering the transformation between sets of noisy objects.


Related Work
Our primary aim in this paper is to simultaneously estimate the rotation and translation that takes one object (line to line/circle to circle/plane to plane/sphere to sphere/point-pair to point-pair) to another. There are many methods that estimate rigid body transformations with points [1][2][3][4]. In [5] the authors estimate a general rotor between arbitrary objects using the idea of carriers-while interesting, this method lacks simplicity and does not deal directly with the objects themselves.
This article is part of the Topical Collection on Proceedings of AGACSE 2018, IMECC-UNICAMP, Campinas, Brazil, edited by Sebastià Xambó-Descamps and Carlile Lavor.

Conformal Geometric Algebra
The objects we work with here will be CGA objects unless explicitly stated otherwise. We will use the standard extension of the 3D geometric algebra, where our 5D CGA space is made up of the standard spatial basis vectors {e i } i = 1, 2, 3, plus two additional basis vectors, e andē with signatures, e 2 = 1,ē 2 = −1. Two null vectors can therefore be defined as: n ∞ = e+ē and n 0 = e−ē 2 . The mapping of a 3D vector x to its conformal representation X is given by X = F (x) = 1 2 (x 2 n ∞ + 2x − 2n 0 ). Many of our target applications will be in computer vision, and in investigating algorithms which use more than just points, which is the case with most conventional computer vision algorithms.

A Rotor Between Objects
Suppose we wish to find the rotor (rotation, translation, dilation) which takes an object X 1 to an object X 2 (where X 1 and X 2 are conformal n-blades representing the lines/circles/planes/spheres/point pairs). If we firstly take lines as an example, conventionally we would translate along the common perpendicular and then rotate about the intersection point-which requires a series of non-trivial geometric operations for two arbitrary lines in space.
Here we seek a method which will not require reverting to the geometric properties of the lines, but which will give the transformation in terms of the lines themselves-and we wish this method to be valid for all objects. In CGA, let the rotor which takes X 1 to X 2 be R x , where this comprises both rotation, translation and dilation rotors. We assume both objects are normalised such that X 2 1 = X 2 2 = γ, where γ = 1 for lines, circles and point pairs, and γ = −1 for planes and spheres: Note, thatX = −γX. We motivate our approach by considering the quantity (X 1 + X 2 ) which is in some sense the 'average' object; ie, if we reflect X 1 in (X 1 + X 2 ), we should get some function of X 2 (we assume for convenience that X 2 = 1, ie γ = 1): So the reflection does indeed produce a multiple, though the multiple is a scalar plus 4-vector, of X 2 . Since we can write the LHS of Eq. (1) as = (1 + X 2 X 1 )X 1 (1 + X 2 X 1 )w e propose to use the spinor quantity Z = 1 + γX 2 X 1 to form R x . As above (but now with γ included) ZX 1Z gives; where M 12 = X 1 X 2 + X 2 X 1 is the anticommutator of X 1 and X 2 . Thus, we see that Z takes X 1 to a multiple of X 2 , where this multiple involves the anticommutator of the objects. In general this anticommutator will have scalar and 4-vector parts (the bivector part of X 1 X 2 cancels with the bivector part of X 2 X 1 ).
Since all 4-vectors square to give a scalar, we can take , is a scalar, which we call μ. We show later that μ is always positive. We now multiply both sides of Eq. (2) by K * to give: We now look to split up K * such that 12 4 and α and β are scalars. If S takes this form, it is clear that it is both self-reverse and commutes with Z and X 1 ; we can therefore write To find such an S we can use the square root formula given in [6] or simply equate scalar and 4-vector parts of the equation S 2 = K * . We do the latter first in order to see how the particular form of our scalar plus 4-vector behaves and then confirm that it agrees with the formula in [6]: 12 4 , we have: 12 4 From equating 4-vector parts we see that 2β(α + β M 12 0 ) = −γ so that, provided M 12 4 = 0; 12 4 If M 12 4 = 0 we simply have S = K 0 if K 0 is positive, which it is for lines, planes, circles and point pairs. K 0 can take negative values for some sphere cases. If M 12 4 = 0 we then find β from the equation which equates scalar parts: since the 4-vectors always square to give zero or a negative scalar. This is a quadratic in u = β 2 : with solutions given by: As β 2 = u we need the solution which is guaranteed to be positive: We can now write the explicit form of the rotor as: 1. If M 12 4 = 0: 2. If M 12 4 = 0 and K 0 > 0 3. If M 12 4 = 0 and K 0 < 0, whereX 2 = −X 2 and K = 2 + γ(X 1X2 +X 2 X 1 ).
Taking the positive or negative square root for β simply changes the sign of the rotor, which makes no difference to the transformation. These expressions hold for all CGA objects: lines, planes, circles, spheres, point pairs. The following subsection will give the explicit forms for each of these objects and will discuss the third case which can occur for spheres.
Before looking in more detail at the nature of the rotors formed by the process outlined here, we return to Eq. (1) and note that we can now take X 1 to X 2 via a reflection in the quantity X m where where S and μ are as given previously, ie μ = K * K and S takes the form in Eqs. (4), (6) and (7) depending on the nature of M 12 . We see in [7] that the quantity S √ μ projects the m-vector obtained from the addition of the two blades X 1 and X 2 onto an m-blade and therefore an object -the object being that in which we reflect X 1 in to get X 2 .
We can also confirm the solutions in Eqs. (4), (6) and (7) using the result in [6], where the square root of the scalar plus 4-vector, Σ, is given by

Lines
Conformal lines take the form L = A ∧ B ∧ n, with A, B being the conformal representations of two points lying on the line, and n the point at infinity. L = −L and we normalise such that L 2 = 1, therefore γ = 1. For lines, the 4 vector part of the anticommutator takes the form βI 5 n ≡ βI 3 n, thus the square of this is always zero, which means λ = 0 and μ = K 2 0 , which reduces Eq. (3) to u = 1/(4 K 0 ) and β = ±1/(2 K 0 [note that it does not matter which sign we take], giving us the simpler form of the rotor as:

Planes
With planes, as with lines, there is no issue of scaling as the objects are infinite. A plane Π is taken to be the conformal 4-blade of the form A ∧ B ∧ C ∧ n, with A, B, C any 3 conformal points lying on the plane. Conformal planes square to a negative number, so we assume that planes are normalised such that Π 2 = −1, therefore γ = −1. Note thatΠ = Π. For planes the anticommutator is a scalar and it is not hard to show that (for normalised planes) K 0 is always positive. Thus, the form for the rotor in the plane-to-plane case is particularly simple as the K 4 term vanishes: where K = 2 − (Π 1 Π 2 + Π 2 Π 1 ).

Circles
One might think that the case of circles-to-circles would be more complex, as a transformation which takes one arbitrary circle to another involves a dilation as well as a rotation and translation. However, nothing in the above derivation assumed anything specific about the rotor, and we find that we can use precisely the same formula to move between arbitrary circles. Let us start with two conformal circles, C 1 and C 2 not necessarily of the same radius. A conformal circle is a 3-blade of the form P ∧ Q ∧ R, where P, Q, R lie on the circle. Circles square to a positive scalar, so we will assume that our circles are normalised such that C 2 = 1 and therefore γ = 1. Note thatC = −C.
The anticommutator, M 12 , is in general a scalar plus 4-vector, so we must use the form given in Eqs. (4) and (5) and little simplification is possible: with K = 2 + (C 1 C 2 + C 2 C 1 ), μ = K * K.

Spheres
We start with two conformal spheres, S 1 and S 2 not necessarily of the same radius. A conformal sphere is a 4-blade of the form N ∧ P ∧ Q ∧ R, where N, P, Q, R lie on the sphere. Circles square to a negative scalar, so we will assume that our spheres are normalised such that S 2 = −1 and therefore γ = −1. Note thatS = S. As for planes, K 2 4 is zero, so the rotor takes a very simple form: where −S 2 is the same sphere as S 2 , so in a sense it does not matter whether we take S 1 to S 2 or to −S 2 -this additional complexity occurs with spheres as they lack any intrinsic orientation, which is not the case for lines, planes, circles and point pairs.

Point Pairs
In the conformal setting, point pairs take the form A ∧ B where A, B are conformal points -we can think of a point pair as a line segment. For a point pair, P , clearlyP = −P and P 2 gives a positive scalar. We will therefore assume that point pairs are normalised so that P 2 = 1.

Lines to Circles: Planes to Spheres
Note that in the previous rotor derivation we assumed X 1 and X 2 were blades of the same grade, but nothing further. Therefore, we should, and indeed do, find that the rotor formulae in Eqs. (4)-(7) work for moving between lines and circles and between planes and spheres.

The Non-uniqueness of the Recovered Rotors
Although we have recovered rotors for each case of lines, planes, circles, spheres and point pairs, it is clear that these rotors are not unique. For example, if we transform one line into another, we can then translate along the second line without altering the result. So, a natural question to ask is exactly what is the transformation we are recovering with the 1 + X 2 X 1 expression.
To investigate this further we extract the bivector, B, for each recovered rotor, with R = e B , and plot the interpolated objects for each of λ i , i = 1, . . . n, with X i = e λiB X 1 e −λiB , where X 2 = RX 1R and λ i = i/n. Figure 1 below show these interpolations for each class of object.

Conclusion
In this paper we have presented a general framework for explicitly extracting the conformal rotor that takes a conformal object of a given grade to another conformal object of the same grade. The technique works for point pairs, lines, circles, planes and spheres. In the process of investigating these rotors we have touched on the form of the object required to reflect one object into another and by visualising intermediate objects we have verified that the rotors take the objects smoothly to each other. Code that implements this rotor extraction algorithm is available in the clifford [8] python package and novel applications of this technique are additionally presented in [7,9] and [10]. It is also interesting to note that the nature of the quantity X 2 X 1 was investigated first in [11], and then in [12], and noted to produce a quantity which was R 2 , where R is the rotor taking X 1 to X 2 . This has also been used for interpolations between objects in [13]. Here we have given explicit expressions for the rotor itself and investigated the whole range of use cases.