Projective Geometric Algebra Done Right and Motor: Difference between pages

From Rigid Geometric Algebra
(Difference between pages)
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
Line 1: Line 1:
'''By Eric Lengyel'''<br />
[[Image:proper_isom.svg|400px|thumb|right|'''Figure 1.''' A motor represents a proper Euclidean isometry, which can always be regarded as a rotation about a line $$\boldsymbol L$$ and a displacement along the same line.]]
January 23, 2020
A ''motor'' is an operator that performs a proper isometry in Euclidean space. Such isometries encompass all possible combinations of any number of [[rotations]] and [[translations]]. The name motor is a portmanteau of ''motion operator'' or ''moment vector''. Motors are equivalent to the set of ''dual quaternions'' used in conventional theories, and the functionality is properly generalized in rigid geometric algebra. Motors cannot perform improper isometries that include an odd number of [[reflections]]; those are instead performed by operators called [[flectors]].


In the 4D rigid geometric algebra $$\mathcal G_{3,0,1}$$, a motor $$\mathbf Q$$ has the general form


In the last chapter of FGED1, I provided a practical introduction to projective Grassmann algebra. Most people working in computer graphics are familiar with four-dimensional homogeneous coordinates, and projective Grassmann algebra extends this concept to a larger algebraic structure under which the wedge and antiwedge products perform geometric manipulations of points, lines, and planes. FGED1 goes on to talk about ''geometric'' algebra as well, which augments Grassmann algebra, but the discussion is pretty much limited to quaternion operations in ordinary 3D space. The projective 4D analog of a quaternion is called a ''dual quaternion'', and I said at the bottom of page 173 that they would be covered in Volume 3 of the FGED series. However, I knew at the time that I didn’t want to present dual quaternions in the usual ways that they have always been introduced in the various papers that have popped up. I found them to be unwieldy, and I was intent on spending some time gaining a deeper understanding of them first so that I could find better ways to formulate the parts that bothered me. That time came over this past holiday break, and the results were better than I had hoped for.
:$$\mathbf Q = Q_{vx} \mathbf e_{41} + Q_{vy} \mathbf e_{42} + Q_{vz} \mathbf e_{43} + Q_{vw} {\large\unicode{x1d7d9}} + Q_{mx} \mathbf e_{23} + Q_{my} \mathbf e_{31} + Q_{mz} \mathbf e_{12} + Q_{mw} \mathbf 1$$ .


I don’t want this post to get too long, so I’m going to assume some familiarity with the material in Chapter 4 of FGED1, and I’m going to be rather brief with everything I write here. The most important things to know are how the wedge product $$\mathbf a \wedge \mathbf b$$ joins objects $$\mathbf a$$ and $$\mathbf b$$ into the higher-dimensional space that they span, how the antiwedge product $$\mathbf a \vee \mathbf b$$ calculates the lower-dimensional space where objects $$\mathbf a$$ and $$\mathbf b$$ meet, and how the geometric product extends the wedge product for vectors $$\mathbf a$$ and $$\mathbf b$$ to give $$\mathbf{ab} = \mathbf a \wedge \mathbf b + \mathbf a \cdot \mathbf b$$. A particular fact used below is that for two planes $$\mathbf g = g_x \mathbf e_{423} + g_y \mathbf e_{431} + g_z \mathbf e_{412} + g_w \mathbf e_{321}$$ and $$\mathbf h = h_x \mathbf e_{423} + h_y \mathbf e_{431} + h_z \mathbf e_{412} + h_w \mathbf e_{321}$$ in projective Grassmann algebra, the antiwedge product $$\mathbf g \vee \mathbf h$$ gives the line where $$\mathbf g$$ and $$\mathbf h$$ intersect.
To possess the [[geometric property]], the components of $$\mathbf Q$$ must satisfy the equation


Recall that the quaternions constitute the even-graded elements of the 3D geometric algebra. A unit-length quaternion $$\mathbf q$$ is called a ''rotor'', and it rotates an object $$x$$ with the sandwich product $$\mathbf q x \mathbf{\tilde q}$$, where the tilde indicates the conjugate or ''reverse'' of $$\mathbf q$$, and juxtaposition represents the geometric product. The object $$x$$ can be a vector, bivector, or even another quaternion, and the appropriate transformation is made to rotate it using the axis and angle stored in $$\mathbf q$$. Importantly, a quaternion can be built out of two reflections through unit vectors $$\mathbf a$$ and $$\mathbf b$$ lying in the plane of rotation and separated by half the angle of rotation. The first reflection through $$\mathbf a$$ is given by $$\mathbf a x \mathbf a$$, and the second reflection through $$\mathbf b$$ is given by $$\mathbf b(\mathbf a x \mathbf a)\mathbf b = \mathbf{ba} x \mathbf {ab}$$. Two reflections produce a rotation that we represent by the quaternion $$\mathbf q = \mathbf{ba}$$.
:$$Q_{vx} Q_{mx} + Q_{vy} Q_{my} + Q_{vz} Q_{mz} + Q_{vw} Q_{mw} = 0$$ .


A pair of reflections through two vectors, and thus a quaternion, can rotate something only about an axis passing through the origin, and it cannot perform any kind of translation. To incorporate translations into a product like $$\mathbf q x \mathbf{\tilde q}$$, which would also allow us to rotate about arbitrary lines, we need to move up to dual quaternions. Dual quaternions constitute the even-graded elements of the 4D geometric algebra $$\mathbb R_{3,0,1}$$. The subscripts 3,0,1 come from Clifford algebra classifications, and they mean that three of the vector basis elements square to $$+1$$, none of them square to $$‒1$$, and one of them squares to $$0$$. Calling the basis elements $$\mathbf e_1$$, $$\mathbf e_2$$, $$\mathbf e_3$$, and $$\mathbf e_4$$, we have $$\mathbf e_1^2 = \mathbf e_2^2 = \mathbf e_3^2 = 1$$ and $$\mathbf e_4^2 = 0$$. There are 8 even-graded components in a dual quaternion, and we can write them as a pair of ordinary quaternions $$\mathbf q_r + \varepsilon \mathbf q_d$$, where $$\mathbf q_r$$ is called the real part, $$\mathbf q_d$$ is called the dual part, and $$\varepsilon = \mathbf e_{1234}$$ squares to zero. Dual quaternions operate on an object $$x$$ through a kind of sandwich product similar to the one used by quaternions: $$(\mathbf q_r + \varepsilon \mathbf q_d)x(\mathbf{\tilde q}_r - \varepsilon \mathbf{\tilde q}_d)$$, where multiplication is the geometric product. When the dual part $$\mathbf q_d$$ is zero, a dual quaternion just performs the rotation represented by the real part $$\mathbf q_r$$. To get a translation by the vector $$\mathbf t$$, we construct the dual quaternion $$1 + \varepsilon (\mathbf i t_x/2 + \mathbf j t_y/2 + \mathbf k t_z/2)$$. Products of dual quaternions corresponding to rotations and translations then give us the full range of rigid motions.
Motors are capable of representing any general screw motion consisting of a rotation about a line combined with a displacement along the same line. By Chasles' theorem, all proper rigid motions in 3D space are screw motions.


The conventional way in which publications teach you how to transform a point $$\mathbf p$$ with a dual quaternion is to first turn $$\mathbf p$$ into the dual quaternion $$1 + \varepsilon \mathbf i p_x + \varepsilon \mathbf j p_y + \varepsilon \mathbf k p_z$$, evaluate the product $$(\mathbf q_r + \varepsilon \mathbf q_d)(1 + \varepsilon \mathbf i p_x + \varepsilon \mathbf j p_y + \varepsilon \mathbf k p_z)(\mathbf{\tilde q}_r - \varepsilon \mathbf{\tilde q}_d)$$, and then pick off the coefficients of the $$\varepsilon \mathbf i$$, $$\varepsilon \mathbf j$$, and $$\varepsilon \mathbf k$$ terms to retrieve the result. This is a hack. What it’s really doing is casting $$\mathbf p$$ as a translation operator, transforming that operator with the dual quaternion, and then casting back to a point. It doesn’t extend to the richer set of geometric objects available in $$\mathbb R_{3,0,1}$$, which include vectors, bivectors, points, lines, and planes. With a dual quaternion $$\mathbf Q$$, what we really want is the ability to evaluate the product $$\mathbf Q x \mathbf{\tilde Q}$$ for any type of object $$x$$ and get a correctly transformed object of the same type as a result, just like we could do in 3D space with ordinary quaternions. In their SIGGRAPH 2019 course “Geometric Algebra for Computer Graphics”, the presenters point out that general $$\mathbf Q x \mathbf{\tilde Q}$$ transformations can be achieved by “turning the algebra on its head” and working with the so-called dual construction. In this formulation, homogeneous vectors represent planes, and homogeneous trivectors represent points, which is the opposite of what makes intuitive sense with respect to the dimensionality of those geometric objects. (Lines are still represented by homogeneous bivectors, but the parts that correspond to the direction and moment are reversed.) I think that requiring that things be done this way is a giant kludge that misses an important part of the big picture, and I find it disagreeable due to some of the problems that it causes. I’ll get back to those below.
An element $$\mathbf x$$ is transformed by a motor $$\mathbf Q$$ through the operation $$\mathbf x' = \mathbf Q \mathbin{\unicode{x27C7}} \mathbf x \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}$$, where $$\unicode{x27C7}$$ is the [[geometric antiproduct]].


The key to using dual quaternions in the proper way without having to resort to any hacks or dimensional reversals is found in the formula $$\mathbf g \vee \mathbf h$$ producing the line where the planes $$\mathbf g$$ and $$\mathbf h$$ intersect. Any rotation about an arbitrary line in 3D space can be decomposed into a pair of reflections through planes that intersect at that line, and the angle of rotation is twice the angle at which the planes meet. In order to capture information about the angle in an operator, we must use a geometric product and not just an exterior product. The problem is that the geometric product incorporates the wedge product $$\wedge$$ whereas the meet of two planes is derived from the antiwedge product $$\vee$$. The geometric product works fine for ordinary quaternions where two reflections through vectors $$\mathbf a$$ and $$\mathbf b$$ produce a rotation in the bivector $$\mathbf a \wedge \mathbf b$$, but it’s not the correct product where two reflections through planes $$\mathbf g$$ and $$\mathbf h$$ produce a rotation about the line $$\mathbf g \vee \mathbf h$$. Instead, we need the geometric analog of the antiwedge product. The existence of such a product follows from the fundamental property that everything in geometric algebra has a complement. (There is an automorphism on every geometric algebra in which elements and operations are mapped to their complements, and it produces the same structure.) The geometric antiproduct that we need complements the geometric product in the same way that the exterior antiproduct (the antiwedge product) complements the exterior product (the wedge product).
The set of all motors, sometimes denoted by $$\unicode{x1D544}$$, forms a subgroup of index 2 in a geometric algebra. Its coset is the set of [[flectors]].


I have searched the literature for any mention of multiplication resembling the geometric antiproduct, but I have come up completely empty. As far as I know, it has never been introduced, and there is no notation for it. Unfortunately, because the geometric product is denoted by juxtaposition, we don’t have an infix operator that we can simply flip upside down like we could with the wedge and antiwedge products. I propose that we use the symbols $$\unicode{x27D1}$$ and $$\unicode{x27C7}$$ to denote the geometric product and geometric antiproduct, respectively, at least in contexts where a distinction is necessary. These symbols fittingly incorporate the fact that the geometric product between vectors combines their wedge product and dot product, and that the geometric antiproduct between antivectors combines their antiwedge product and antidot product. (The antidot product works with antivectors in the same way that the dot product works with vectors, but it produces an antiscalar quantity instead of a scalar quantity.)
== Simple Motors ==


The correct way to construct a dual quaternion $$\mathbf Q$$ from a pair of reflections through the planes $$\mathbf g$$ and $$\mathbf h$$ is by calculating $$\mathbf Q = \mathbf g \mathbin{\unicode{x27C7}} \mathbf h$$. This calculates the line $$\mathbf g \vee \mathbf h$$ and adds the value $$(g_xh_x + g_yh_y + g_zh_z)\mathbf e_{1234}$$ to it. If the planes $$\mathbf g$$ and $$\mathbf h$$ are normalized, then that additional antidot product is the cosine of the angle between the normal directions, which is half the angle of rotation. If $$\mathbf g$$ and $$\mathbf h$$ are parallel, then $$\mathbf Q$$ represents a translation along the normal direction by twice the distance separating the planes. In general, a unit-length dual quaternion $$\mathbf R$$ having the form
If $$Q_{mw} = 0$$ (i.e., the scalar part $$Q_{\mathbf 1}$$ is zero), then the motor $$\mathbf Q$$ is called a ''simple motor''. Every simple motor represents either a pure [[translation]] or a pure [[rotation]] about a line without any displacement along that line.


:$$\mathbf R = (a_x \mathbf e_{41} + a_y \mathbf e_{42} + a_z \mathbf e_{43}) \sin(\phi/2) + \mathbf e_{1234} \cos(\phi/2)$$
In the case of a pure translation, the motor $$\mathbf T$$ is given by


is a pure rotation through the angle $$\phi$$ about the axis $$(a_x, a_y, a_z)$$. A dual quaternion $$\mathbf T$$ having the form
:$$\mathbf T = t_x \mathbf e_{23} + t_y \mathbf e_{31} + t_z \mathbf e_{12} + {\large\unicode{x1d7d9}}$$ ,


:$$\mathbf T = (t_x/2)\mathbf e_{23} + (t_y/2)\mathbf e_{31} + (t_z/2)\mathbf e_{12} + \mathbf e_{1234}$$
and this performs a translation by twice the displacement vector $$(t_x, t_y, t_z)$$.


is a pure translation by the vector $$\mathbf t$$. Combinations of these types of dual quaternions under the geometric antiproduct can be used to construct all rigid motions in three dimensions. Any object $$x$$, whether it be a point, line, plane, or any other member of $$\mathbb R_{3,0,1}$$, is transformed by a dual quaternion $$\mathbf Q$$ using the same sandwich product $$\mathbf Q \mathbin{\unicode{x27C7}} x \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}$$. Here, the squiggle has been moved to the bottom to indicate that we are using the complement of the reverse operation, which we could call the ''antireverse''. For dual quaternions, whether we use the reverse or antireverse doesn’t matter because they have the same effect on even-graded elements. But for other operators, such as a reflection through a single plane, or in geometric algebras for spaces of other dimensionality, it can make a difference in sign.
In the case of a pure rotation, the motor $$\mathbf R$$ is given by


I’ve whipped up a poster-sized reference guide for projective geometric algebra in $$\mathbb R_{3,0,1}$$. It provides a lot of the details for geometric calculations in 4D Grassmann algebra, it contains the complete multiplication tables for both the geometric product and geometric antiproduct, and it shows explicit formulas for performing transformations with dual quaternions. (This reference guide has been doubled in size to include information from the next post, [[Symmetries in Projective Geometric Algebra]].)
:$$\mathbf R = \boldsymbol l\sin\phi + {\large\unicode{x1d7d9}}\cos\phi$$ ,


The authors of the SIGGRAPH course I mentioned earlier claimed that their dual construction was the only way to implement plane-based projective geometric algebra, but that is not true. Their failure to recognize the existence of the geometric antiproduct forced them to do many things backwards, and the result was an unnecessarily convoluted geometric model that resists intuition. While they’ve managed to make things work from a purely computational perspective, I perceive the quirks in their model as essentially aberrations derived from an incomplete picture of the mathematics. The following list summarizes the main problems that arise.
and this performs a rotation by twice the angle $$\phi$$ about the [[line]] $$\boldsymbol l$$.


* Their model requires that points be represented by trivectors and planes be represented by vectors. This is backwards. In 4D projective space, points are one-dimensional, and planes are three-dimensional. The projection into 3D space removes a dimension and naturally make points zero-dimensional and planes two-dimensional, but that’s not what they have. Furthermore, swapping points and planes has serious implications for nonorthogonal change-of-basis transformations, which happen in computer graphics all the time, but they completely ignore this issue.
== Motors Built from Geometry ==


* Because points and planes are backwards, the geometric meaning of the wedge and antiwedge products are also necessarily backwards. Their model requires that $$\wedge$$ corresponds to a dimension-decreasing meet operation and $$\vee$$ corresponds to a dimension-increasing join operation, but in the Grassmann algebra used by the rest of the world, the meanings are the other way around.
Motors having specific geometric constructions can be built from [[Point | points]], [[Line | lines]], and [[Plane | planes]] as shown in the following table.


* Their concept of normalization is backwards. The projective dimension is represented by the basis element $$\mathbf e_4$$, and this means that an object in the projective algebra is normalized when the part that extends into this fourth dimension has a magnitude of one. For example, a homogeneous point is normalized when its $$\mathbf e_4$$ coordinate is one, a line is normalized when its $$(\mathbf e_{41}, \mathbf e_{42}, \mathbf e_{43})$$ direction has length one, and a plane is normalized when its $$(\mathbf e_{423}, \mathbf e_{431}, \mathbf e_{412})$$ normal has length one. This also applies to a dual quaternion, which is normalized when its $$(\mathbf e_{41}, \mathbf e_{42}, \mathbf e_{43}, \mathbf e_{1234})$$ rotor part has length one. In general, the magnitude of the collection of components involving the projective basis element $$\mathbf e_4$$ has to be one. However, in the dual construction model, its the components that don’t involve $$\mathbf e_4$$ that must have a magnitude of one.
{| class="wikitable"
! Motor|| Description
|-
| style="padding: 12px;" | $$\begin{split}\mathbf h \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{g}}} =\, &(g_yh_z - g_zh_y)\mathbf e_{41} + (g_zh_x - g_xh_z)\mathbf e_{42} + (g_xh_y - g_yh_x)\mathbf e_{43} \\ +\, &(h_xg_w - g_xh_w)\mathbf e_{23} + (h_yg_w - g_yh_w)\mathbf e_{31} + (h_zg_w - g_zh_w)\mathbf e_{12} \\ +\, &(g_xh_x + g_yh_y + g_zh_z)\smash{\large\unicode{x1d7d9}}\end{split}$$
| style="padding: 12px;" | Rotation about the line where planes $$\mathbf g$$ and $$\mathbf h$$ intersect by twice the angle between them in the direction from $$\mathbf g$$ to $$\mathbf h$$.


This awkwardness is instantly cleaned up by using the product that naturally performs reflection through planes, the geometric antiproduct $$\unicode{x27C7}$$. Points and planes still have the right dimensionality, the wedge product still calculates the join, the antiwedge product still calculates the meet, and normalization always involves only the projective dimension. Nothing has to be flipped upside down or turned inside out, and nonorthogonal change-of-basis transformations have the correct effect on the geometry associated with elements of every grade. The lack of problems in the model produced by the geometric antiproduct and its natural elegance make it clear to me that it is the right way to go.
$$\mathbf g = g_x \mathbf e_{234} + g_y \mathbf e_{314} + g_z \mathbf e_{124} + g_w \mathbf e_{321}$$


Keep in mind that the description above is extremely abbreviated, and there is a lot more that can be said about using dual quaternions to perform rigid motions. There are a lot of computational details on the reference poster, which is also available as a [https://www.amazon.com/dp/B09F8PN65Y/?tag=terathon-20 18×24 inch print on Amazon]. I will be dedicating an entire chapter to this subject in FGED3, where I will also cover its application to skinning.
$$\mathbf h = h_x \mathbf e_{234} + h_y \mathbf e_{314} + h_z \mathbf e_{124} + h_w \mathbf e_{321}$$
|-
| style="padding: 12px;" | $$\begin{split}\boldsymbol l \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{k}}}
=\, &(l_{vz} k_{vy} - l_{vy} k_{vz})\mathbf e_{41} + (l_{vx} k_{vz} - l_{vz} k_{vx})\mathbf e_{42} + (l_{vy} k_{vx} - l_{vx} k_{vy})\mathbf e_{43} \\
+\, &(l_{vz} k_{my} - l_{vy} k_{mz} + l_{mz} k_{vy} - l_{my} k_{vz})\mathbf e_{23} + (l_{vx} k_{mz} - l_{vz} k_{mx} + l_{mx} k_{vz} - l_{mz} k_{vx})\mathbf e_{31} + (l_{vy} k_{mx} - l_{vx} k_{my} + l_{my} k_{vx} - l_{mx} k_{vy})\mathbf e_{12} \\
+\, &(l_{vx} k_{mx} + l_{vy} k_{my} + l_{vz} k_{mz} + l_{mx} k_{vx} + l_{my} k_{vy} + l_{mz} k_{vz}) \\
+\, &(l_{vx} k_{vx} + l_{vy} k_{vy} + l_{vz} k_{vz})\smash{\large\unicode{x1d7d9}}\end{split}$$
| style="padding: 12px;" | Rotation about the line containing the closest points on lines $$\mathbf k$$ and $$\boldsymbol l$$ by twice the angle between the directions $$(l_{vx}, l_{vy}, l_{vz})$$ and $$(k_{vx}, k_{vy}, k_{vz})$$, and translation by twice the distance between the lines in the direction from $$\mathbf k$$ to $$\boldsymbol l$$.
 
$$\mathbf k = k_{vx} \mathbf e_{41} + k_{vy} \mathbf e_{42} + k_{vz} \mathbf e_{43} + k_{mx} \mathbf e_{23} + k_{my} \mathbf e_{31} + k_{mz} \mathbf e_{12}$$
 
$$\boldsymbol l = l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} + l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12}$$
|-
| style="padding: 12px;" | $$\mathbf q \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{p}}} = (q_xp_w - p_xq_w)\mathbf e_{23} + (q_yp_w - p_yq_w)\mathbf e_{31} + (q_zp_w - p_zq_w)\mathbf e_{12} + (p_wq_w)\smash{\large\unicode{x1d7d9}}$$
| style="padding: 12px;" | Translation by twice the distance between points $$\mathbf p$$ and $$\mathbf q$$ in the direction from $$\mathbf p$$ to $$\mathbf q$$.
 
$$\mathbf p = p_x \mathbf e_1 + p_y \mathbf e_2 + p_z \mathbf e_3 + p_w \mathbf e_4$$
 
$$\mathbf q = q_x \mathbf e_1 + q_y \mathbf e_2 + q_z \mathbf e_3 + q_w \mathbf e_4$$
|}
 
== Norm ==
 
The [[bulk norm]] of a motor $$\mathbf Q$$ is given by
 
:$$\left\Vert\mathbf Q\right\Vert_\unicode{x25CF} = \sqrt{\mathbf Q \mathbin{\unicode{x25CF}} \mathbf{\tilde Q}} = \sqrt{Q_{mx}^2 + Q_{my}^2 + Q_{mz}^2 + Q_{mw}^2}$$ ,
 
and its [[weight norm]] is given by
 
:$$\left\Vert\mathbf Q\right\Vert_\unicode{x25CB} = \sqrt{\mathbf Q \mathbin{\unicode{x25CB}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}\vphantom{\mathbf{\tilde Q}}} = {\large\unicode{x1D7D9}}\sqrt{Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2}$$ .
 
The [[geometric norm]] of a motor $$\mathbf Q$$ is thus
 
:$$\widehat{\left\Vert\mathbf Q\right\Vert} = \sqrt{\dfrac{Q_{mx}^2 + Q_{my}^2 + Q_{mz}^2 + Q_{mw}^2}{Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2}}$$ ,
 
and this is equal to half the distance that the origin is moved by the operator.
 
A motor is [[unitized]] when $$Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2 = 1$$.
 
== Exponential Form ==
 
A motor $$\mathbf Q$$ can be expressed as the exponential of a [[unitized]] [[line]] $$\boldsymbol l$$ multiplied by $$d + \phi{\large\unicode{x1D7D9}}$$, where $$\phi$$ is half the angle of rotation about the line $$\boldsymbol l$$, and $$d$$ is half the displacement distance along the line $$\boldsymbol l$$. The exponential form can be written as
 
:$$\mathbf Q = \exp_\unicode{x27C7}((d + \phi{\large\unicode{x1D7D9}}) \mathbin{\unicode{x27C7}} \boldsymbol l) = \cos_\unicode{x27C7}(d + \phi{\large\unicode{x1D7D9}}) + \sin_\unicode{x27C7}(d + \phi{\large\unicode{x1D7D9}}) \mathbin{\unicode{x27C7}} \boldsymbol l$$ .
 
This expands to
 
:$$\mathbf Q = \boldsymbol l\sin\phi + (d \mathbin{\unicode{x27C7}} \boldsymbol l)\cos\phi - d\sin\phi + {\large\unicode{x1D7D9}}\cos\phi$$ ,
 
and replacing the [[line]] $$\boldsymbol l$$ with its components gives us
 
:$$\mathbf Q = (l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} + l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12})\sin\phi + d(l_{vx} \mathbf e_{23} + l_{vy} \mathbf e_{31} + l_{vz} \mathbf e_{12})\cos\phi - d\sin\phi + {\large\unicode{x1D7D9}}\cos\phi$$ .
 
A motor in exponential form is always [[unitized]], and its [[geometric norm]] can be written as
 
:$$\widehat{\left\Vert\mathbf Q\right\Vert} = \sqrt{d^2 + (l_{mx}^2 + l_{my}^2 + l_{mz}^2)\sin^2\phi}$$ .
 
The quantity $$d + \phi{\large\unicode{x1D7D9}}$$, as a homogeneous magnitude, is the ''pitch'' of the screw transformation performed by the motor, which is the amount of translation along the screw axis per radian of rotation.
 
== Logarithm ==
 
Given an arbitrary [[unitized]] motor $$\mathbf Q$$ with $$|Q_{vw}| < 1$$, the values of $$\boldsymbol l$$, $$d$$, and $$\phi$$ can be determined from the components of $$\mathbf Q$$, essentially taking the logarithm of a motor. First, the [[scalar]] and [[antiscalar]] terms satisfy the equations
 
:$$Q_{mw} = -d\sin\phi$$
:$$Q_{vw} = \cos\phi$$ .
 
Assuming that $$\phi > 0$$, we define $$s = \sin\phi = \sqrt{1 - Q_{vw}^2}$$. Then,
 
:$$d = -\dfrac{Q_{mw}}{s}$$
:$$\phi = \tan^{-1}\left(\dfrac{s}{Q_{vw}}\right)$$ .
 
If $$Q_{vw} = 0$$, then we assign $$\phi = \pi/2$$. If $$Q_{vw} < 0$$, then we can add $$\pi$$ to $$\phi$$ to make the angle positive, but this is not required.
 
The components of $$\boldsymbol l$$ are then given by
 
:$$(l_{vx}, l_{vy}, l_{vz}) = \dfrac{1}{s}(Q_{vx}, Q_{vy}, Q_{vz})$$
 
:$$(l_{mx}, l_{my}, l_{mz}) = \dfrac{1}{s}\left[(Q_{mx}, Q_{my}, Q_{mz}) - \dfrac{dQ_{vw}}{s}(Q_{vx}, Q_{vy}, Q_{vz})\right] = \dfrac{1}{s}\left[(Q_{mx}, Q_{my}, Q_{mz}) + \dfrac{Q_{vw} Q_{mw}}{s^2}(Q_{vx}, Q_{vy}, Q_{vz})\right]$$ .
 
In the special case that $$Q_{vw} = \pm 1$$, the motor must be a pure [[translation]] with $$\phi = 0$$ and $$(Q_{vx}, Q_{vy}, Q_{vz}) = (0, 0, 0)$$.
 
== Square Root ==
 
The square root of a [[quaternion]] can be calculated by summing with the identity and renormalizing. If we attempt to do the same thing with a motor $$\mathbf Q$$, we find that it works only under certain conditions. However, such a calculation does give us a starting point from which we can make a correction for the general case.
 
Using the exponential form of $$\mathbf Q$$, we first examine the [[weight norm]] of $$\mathbf Q + {\large\unicode{x1D7D9}}$$ and find that
 
:$$\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB} = \sqrt{\sin^2\phi + (\cos\phi + 1)^2} = \sqrt{\vphantom{\sin^2\phi}2 + 2Q_\smash{\large\unicode{x1D7D9}}}$$ ,
 
where $$Q_{\large\unicode{x1D7D9}} = \cos\phi$$. Applying the trigonometric identity $$\cos^2(\phi/2) = (1 + \cos\phi)/2$$, we can rewrite this as
 
:$$\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB} = 2\cos(\phi/2)$$ .
 
Applying several more trigonometric identities, we now observe
 
:$$\dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{2\cos(\phi/2)} = \boldsymbol l\sin(\phi/2) + \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\cos(\phi/2) - \dfrac{d}{2}\sin(\phi/2) + {\large\unicode{x1D7D9}}\cos(\phi/2) - \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\sin(\phi/2)\tan(\phi/2) - \dfrac{d}{2}\sin(\phi/2)$$ .
 
The first four terms are exactly the square root of $$\mathbf Q$$ because the distance $$d$$ and angle $$\phi$$ have both been halved. But there are two additional terms that we need to eliminate. It just so happens that
 
:$$\dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}} \mathbin{\unicode{x27C7}} \dfrac{d}{2}\tan(\phi/2) = \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\sin(\phi/2)\tan(\phi/2) + \dfrac{d}{2}\sin(\phi/2)$$ ,
 
which means that
 
:$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} \mathbin{\unicode{x27C7}} \left({\large\unicode{x1D7D9}} + \dfrac{d}{2}\tan(\phi/2)\right)$$ .
 
The scalar component of $$\mathbf Q$$ can be rewritten as $$Q_{\mathbf 1} = -d\sin\phi = -2d\sin(\phi/2)\cos(\phi/2) $$. Dividing this by $$2 + 2Q_{\large\unicode{x1D7D9}} = 4\cos^2(\phi/2)$$ yields
 
:$$\dfrac{Q_\mathbf 1}{2 + 2Q_{\large\unicode{x1D7D9}}} = -\dfrac{d}{2}\tan(\phi/2)$$ .
 
The square root of a general motor $$\mathbf Q$$ is thus given by
 
:$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} \mathbin{\unicode{x27C7}} \left({\large\unicode{x1D7D9}} - \dfrac{Q_\mathbf 1}{2 + 2Q_{\large\unicode{x1D7D9}}}\right)$$ .
 
If $$\mathbf Q$$ is a simple motor, then $$Q_{\mathbf 1} = 0$$, and this reduces to
 
:$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}}$$ .
 
== Factorization ==
 
Any [[unitized]] motor $$\mathbf Q$$ can be factored into the product of a motor $$\mathbf R = Q_{vx} \mathbf e_{41} + Q_{vy} \mathbf e_{42} + Q_{vz} \mathbf e_{43} + Q_{vw} {\large\unicode{x1D7D9}}$$ corresponding to a pure [[rotation]] about a line through the origin and a motor $$\mathbf T = {t_x \mathbf e_{23} + t_y \mathbf e_{31} + t_z \mathbf e_{12} + \large\unicode{x1d7d9}}$$ corresponding to a pure [[translation]] by calculating
 
:$$\mathbf T = \mathbf Q \mathbin{\unicode{x27C7}} \mathbf{\underset{\Large\unicode{x7E}}{R}}$$ .
 
The motor $$\mathbf T$$ is then given by
 
:$$\mathbf T = (Q_{vy} Q_{mz} - Q_{vz} Q_{my} + Q_{mx} Q_{vw} - Q_{vx} Q_{mw})\mathbf e_{23} + (Q_{vz} Q_{mx} - Q_{vx} Q_{mz} + Q_{my} Q_{vw} - Q_{vy} Q_{mw})\mathbf e_{31} + (Q_{vx} Q_{my} - Q_{vy} Q_{mx} + Q_{mz} Q_{vw} - Q_{vz} Q_{mw})\mathbf e_{12} + {\large\unicode{x1d7d9}}$$ .
 
The original motor $$\mathbf Q$$ can now be expressed as
 
:$$\mathbf Q = \mathbf T \mathbin{\unicode{x27C7}} \mathbf R$$ ,
 
where both $$\mathbf R$$ and $$\mathbf T$$ are [[unitized]] simple motors.
 
== Conversion from Motor to Matrix ==
 
Given a specific [[Unitization | unitized]] motor $$\mathbf Q$$, define the matrices
 
:$$\mathbf A = \begin{bmatrix}1 - 2(Q_{vy}^2 + Q_{vz}^2) & 2Q_{vx} Q_{vy} & 2Q_{vz} Q_{vx} & 2(Q_{vy} Q_{mz} - Q_{vz} Q_{my}) \\ 2Q_{vx} Q_{vy} & 1 - 2(Q_{vz}^2 + Q_{vx}^2) & 2Q_{vy} Q_{vz} & 2(Q_{vz} Q_{mx} - Q_{vx} Q_{mz}) \\ 2Q_{vz} Q_{vx} & 2Q_{vy} Q_{vz} & 1 - 2(Q_{vx}^2 + Q_{vy}^2) & 2(Q_{vx} Q_{my} - Q_{vy} Q_{mx}) \\ 0 & 0 & 0 & 1\end{bmatrix}$$
 
and
 
:$$\mathbf B = \begin{bmatrix}0 & -2Q_{vz} Q_{vw} & 2Q_{vy} Q_{vw} & 2(Q_{vw} Q_{mx} - Q_{vx} Q_{mw}) \\ 2Q_{vz} Q_{vw} & 0 & -2Q_{vx} Q_{vw} & 2(Q_{vw} Q_{my} - Q_{vy} Q_{mw}) \\ -2Q_{vy} Q_{vw} & 2Q_{vx} Q_{vw} & 0 & 2(Q_{vw} Q_{mz} - Q_{vz} Q_{mw}) \\ 0 & 0 & 0 & 0\end{bmatrix}$$ .
 
Then the corresponding 4&times;4 matrix $$\mathbf M$$ that transforms a [[point]] $$\mathbf p$$, regarded as a column matrix, as $$\mathbf p' = \mathbf{Mp}$$ is given by
 
:$$\mathbf M = \mathbf A + \mathbf B$$ .
 
The inverse of $$\mathbf M$$, which transforms a [[plane]] $$\mathbf g$$, regarded as a row matrix, as $$\mathbf g' = \mathbf{gM^{-1}}$$ is given by
 
:$$\mathbf M^{-1} = \mathbf A - \mathbf B$$ .
 
== Conversion from Matrix to Motor ==
 
Let $$\mathbf M$$ be an orthogonal 4&times;4 matrix with determinant +1 having the form
 
:$$\mathbf M = \begin{bmatrix} M_{00} & M_{01} & M_{02} & M_{03} \\ M_{10} & M_{11} & M_{12} & M_{13} \\ M_{20} & M_{21} & M_{22} & M_{23} \\ 0 & 0 & 0 & 1\end{bmatrix}$$ .
 
Then, by equating the entries of $$\mathbf M$$ to the entries of $$\mathbf A + \mathbf B$$ from above, we have the following four relationships based on the diagonal entries of $$\mathbf M$$:
 
:$$M_{00} - M_{11} - M_{22} + 1 = 4Q_{vx}^2$$
 
:$$M_{11} - M_{22} - M_{00} + 1 = 4Q_{vy}^2$$
 
:$$M_{22} - M_{00} - M_{11} + 1 = 4Q_{vz}^2$$
 
:$$M_{00} + M_{11} + M_{22} + 1 = 4(1 - Q_{vx}^2 - Q_{vy}^2 - Q_{vz}^2) = 4Q_{vw}^2$$
 
And we have the following six relationships based on the off-diagonal entries of $$\mathbf M$$:
 
:$$M_{21} + M_{12} = 4Q_{vy} Q_{vz}$$
 
:$$M_{02} + M_{20} = 4Q_{vz} Q_{vx}$$
 
:$$M_{10} + M_{01} = 4Q_{vx} Q_{vy}$$
 
:$$M_{21} - M_{12} = 4Q_{vx} Q_{vw}$$
 
:$$M_{02} - M_{20} = 4Q_{vy} Q_{vw}$$
 
:$$M_{10} - M_{01} = 4Q_{vz} Q_{vw}$$
 
If $$M_{00} + M_{11} + M_{22} \geq 0$$, then we calculate
 
:$$Q_{vw} = \pm \dfrac{1}{2}\sqrt{M_{00} + M_{11} + M_{22} + 1}$$ ,
 
where either sign can be chosen. In this case, we know $$|Q_{vw}|$$ is at least $$1/2$$, so we can safely divide by $$4Q_{vw}$$ in the last three off-diagonal relationships above to solve for $$Q_{vx}$$, $$Q_{vy}$$, and $$Q_{vz}$$. Otherwise, if $$M_{00} + M_{11} + M_{22} < 0$$, then we select one of the first three diagonal relationships based on the largest diagonal entry $$M_{00}$$, $$M_{11}$$, or $$M_{22}$$. After calculating $$Q_{vx}$$, $$Q_{vy}$$, or $$Q_{vz}$$, we plug its value into two of the first three off-diagonal relationships to solve for the other two values of $$Q_{vx}$$, $$Q_{vy}$$, and $$Q_{vz}$$. Finally, we plug it into one of the last three off-diagonal relationships to solve for $$Q_{vw}$$.
 
Setting $$t_x = M_{03}$$, $$t_y = M_{13}$$, and $$t_z = M_{23}$$, the values of $$Q_{mx}$$, $$Q_{my}$$, $$Q_{mz}$$, and $$Q_{mw}$$ are given by
 
$$Q_{mx} = \dfrac{1}{2}(Q_{vw} t_x + Q_{vz} t_y - Q_{vy} t_z)$$
 
$$Q_{my} = \dfrac{1}{2}(Q_{vw} t_y + Q_{vx} t_z - Q_{vz} t_x)$$
 
$$Q_{mz} = \dfrac{1}{2}(Q_{vw} t_z + Q_{vy} t_x - Q_{vx} t_y)$$
 
$$Q_{mw} = -\dfrac{1}{2}(Q_{vx} t_x + Q_{vy} t_y + Q_{vz} t_z)$$ .
 
== Motor Transformations ==
 
[[Point | Points]], [[Line | lines]], and [[Plane | planes]] are transformed by a [[unitized]] motor $$\mathbf Q$$ as shown in the following table.
 
{| class="wikitable"
! Type || Transformation
|-
| style="padding: 12px;" | [[Point]]
 
$$\mathbf p = p_x \mathbf e_1 + p_y \mathbf e_2 + p_z \mathbf e_3 + p_w \mathbf e_4$$
| style="padding: 12px;" | $$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \mathbf p \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)p_x + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})p_y + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})p_z + 2(Q_{vy}Q_{mz} - Q_{vz}Q_{my} + Q_{vw}Q_{mx} - Q_{vx}Q_{mw})p_w\right]\mathbf e_1 \\ +\, &\left[(1 - 2Q_{vz}^2 -2Q_{vx}^2))p_y + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})p_z + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})p_x + 2(Q_{vz}Q_{mx} - Q_{vx}Q_{mz} + Q_{vw}Q_{my} - Q_{vy}Q_{mw})p_w\right]\mathbf e_2 \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2))p_z + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})p_x + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})p_y + 2(Q_{vx}Q_{my} - Q_{vy}Q_{mx} + Q_{vw}Q_{mz} - Q_{vz}Q_{mw})p_w\right]\mathbf e_3 \\ +\, &p_w\mathbf e_4\end{split}$$
|-
| style="padding: 12px;" | [[Line]]
 
$$\begin{split}\boldsymbol l =\, &l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} \\ +\, &l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12}\end{split}$$
| style="padding: 12px;" | $$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \boldsymbol l \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)l_{vx} + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})l_{vy} + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})l_{vz}\right]\mathbf e_{41} \\ +\, &\left[(1 - 2Q_{vz}^2 - 2Q_{vx}^2)l_{vy} + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})l_{vz} + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})l_{vx}\right]\mathbf e_{42} \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2)l_{vz} + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})l_{vx} + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})l_{vy}\right]\mathbf e_{43} \\ +\, &\left[-4(Q_{vy}Q_{my} + Q_{vz}Q_{mz})l_{vx} + 2(Q_{vy}Q_{mx} + Q_{vx}Q_{my} - Q_{vz}Q_{mw} - Q_{vw}Q_{mz})l_{vy} + 2(Q_{vz}Q_{mx} + Q_{vx}Q_{mz} + Q_{vy}Q_{mw} + Q_{vw}Q_{my})l_{vz} + (1 - 2Q_{vy}^2 - 2Q_{vz}^2)l_{mx} + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})l_{my} + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})l_{mz}\right]\mathbf e_{23} \\ +\, &\left[-4(Q_{vz}Q_{mz} + Q_{vx}Q_{mx})l_{vy} + 2(Q_{vz}Q_{my} + Q_{vy}Q_{mz} - Q_{vx}Q_{mw} - Q_{vw}Q_{mx})l_{vz} + 2(Q_{vx}Q_{my} + Q_{vy}Q_{mx} + Q_{vz}Q_{mw} + Q_{vw}Q_{mz})l_{vx} + (1 - 2Q_{vz}^2 - 2Q_{vx}^2)l_{my} + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})l_{mz} + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})l_{mx}\right]\mathbf e_{31} \\ +\, &\left[-4(Q_{vx}Q_{mx} + Q_{vy}Q_{my})l_{vz} + 2(Q_{vx}Q_{mz} + Q_{vz}Q_{mx} - Q_{vy}Q_{mw} - Q_{vw}Q_{my})l_{vx} + 2(Q_{vy}Q_{mz} + Q_{vz}Q_{my} + Q_{vx}Q_{mw} + Q_{vw}Q_{mx})l_{vy} + (1 - 2Q_{vx}^2 - 2Q_{vy}^2)l_{mz} + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})l_{mx} + 2(Q_{vy}Q_{vz} + 2Q_{vx}Q_{vw})l_{my}\right]\mathbf e_{12}\end{split}$$
|-
| style="padding: 12px;" | [[Plane]]
 
$$\mathbf g = g_x \mathbf e_{423} + g_y \mathbf e_{431} + g_z \mathbf e_{412} + g_w \mathbf e_{321}$$
| style="padding: 12px;" | $$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \mathbf g \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)g_x + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})g_y + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})g_z\right]\mathbf e_{423} \\ +\, &\left[(1 - 2Q_{vz}^2 - 2Q_{vx}^2)g_y + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})g_z + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})g_x\right]\mathbf e_{431} \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2)g_z + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})g_x + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})g_y\right]\mathbf e_{412} \\ +\, &\left[2(Q_{vy}Q_{mz} - Q_{vz}Q_{my} + Q_{vx}Q_{mw} - Q_{vw}Q_{mx})g_x + 2(Q_{vz}Q_{mx} - Q_{vx}Q_{mz} + Q_{vy}Q_{mw} - Q_{vw}Q_{my})g_y + 2(Q_{vx}Q_{my} - Q_{vy}Q_{mx} + Q_{vz}Q_{mw} - Q_{vw}Q_{mz})g_z + g_w\right]\mathbf e_{321}\end{split}$$
|}


== See Also ==
== See Also ==


* [[Symmetries in Projective Geometric Algebra]]
* [[Flector]]
* [[Translation]]
* [[Rotation]]

Revision as of 05:36, 6 August 2023

Figure 1. A motor represents a proper Euclidean isometry, which can always be regarded as a rotation about a line $$\boldsymbol L$$ and a displacement along the same line.

A motor is an operator that performs a proper isometry in Euclidean space. Such isometries encompass all possible combinations of any number of rotations and translations. The name motor is a portmanteau of motion operator or moment vector. Motors are equivalent to the set of dual quaternions used in conventional theories, and the functionality is properly generalized in rigid geometric algebra. Motors cannot perform improper isometries that include an odd number of reflections; those are instead performed by operators called flectors.

In the 4D rigid geometric algebra $$\mathcal G_{3,0,1}$$, a motor $$\mathbf Q$$ has the general form

$$\mathbf Q = Q_{vx} \mathbf e_{41} + Q_{vy} \mathbf e_{42} + Q_{vz} \mathbf e_{43} + Q_{vw} {\large\unicode{x1d7d9}} + Q_{mx} \mathbf e_{23} + Q_{my} \mathbf e_{31} + Q_{mz} \mathbf e_{12} + Q_{mw} \mathbf 1$$ .

To possess the geometric property, the components of $$\mathbf Q$$ must satisfy the equation

$$Q_{vx} Q_{mx} + Q_{vy} Q_{my} + Q_{vz} Q_{mz} + Q_{vw} Q_{mw} = 0$$ .

Motors are capable of representing any general screw motion consisting of a rotation about a line combined with a displacement along the same line. By Chasles' theorem, all proper rigid motions in 3D space are screw motions.

An element $$\mathbf x$$ is transformed by a motor $$\mathbf Q$$ through the operation $$\mathbf x' = \mathbf Q \mathbin{\unicode{x27C7}} \mathbf x \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}$$, where $$\unicode{x27C7}$$ is the geometric antiproduct.

The set of all motors, sometimes denoted by $$\unicode{x1D544}$$, forms a subgroup of index 2 in a geometric algebra. Its coset is the set of flectors.

Simple Motors

If $$Q_{mw} = 0$$ (i.e., the scalar part $$Q_{\mathbf 1}$$ is zero), then the motor $$\mathbf Q$$ is called a simple motor. Every simple motor represents either a pure translation or a pure rotation about a line without any displacement along that line.

In the case of a pure translation, the motor $$\mathbf T$$ is given by

$$\mathbf T = t_x \mathbf e_{23} + t_y \mathbf e_{31} + t_z \mathbf e_{12} + {\large\unicode{x1d7d9}}$$ ,

and this performs a translation by twice the displacement vector $$(t_x, t_y, t_z)$$.

In the case of a pure rotation, the motor $$\mathbf R$$ is given by

$$\mathbf R = \boldsymbol l\sin\phi + {\large\unicode{x1d7d9}}\cos\phi$$ ,

and this performs a rotation by twice the angle $$\phi$$ about the line $$\boldsymbol l$$.

Motors Built from Geometry

Motors having specific geometric constructions can be built from points, lines, and planes as shown in the following table.

Motor Description
$$\begin{split}\mathbf h \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{g}}} =\, &(g_yh_z - g_zh_y)\mathbf e_{41} + (g_zh_x - g_xh_z)\mathbf e_{42} + (g_xh_y - g_yh_x)\mathbf e_{43} \\ +\, &(h_xg_w - g_xh_w)\mathbf e_{23} + (h_yg_w - g_yh_w)\mathbf e_{31} + (h_zg_w - g_zh_w)\mathbf e_{12} \\ +\, &(g_xh_x + g_yh_y + g_zh_z)\smash{\large\unicode{x1d7d9}}\end{split}$$ Rotation about the line where planes $$\mathbf g$$ and $$\mathbf h$$ intersect by twice the angle between them in the direction from $$\mathbf g$$ to $$\mathbf h$$.

$$\mathbf g = g_x \mathbf e_{234} + g_y \mathbf e_{314} + g_z \mathbf e_{124} + g_w \mathbf e_{321}$$

$$\mathbf h = h_x \mathbf e_{234} + h_y \mathbf e_{314} + h_z \mathbf e_{124} + h_w \mathbf e_{321}$$

$$\begin{split}\boldsymbol l \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{k}}} =\, &(l_{vz} k_{vy} - l_{vy} k_{vz})\mathbf e_{41} + (l_{vx} k_{vz} - l_{vz} k_{vx})\mathbf e_{42} + (l_{vy} k_{vx} - l_{vx} k_{vy})\mathbf e_{43} \\ +\, &(l_{vz} k_{my} - l_{vy} k_{mz} + l_{mz} k_{vy} - l_{my} k_{vz})\mathbf e_{23} + (l_{vx} k_{mz} - l_{vz} k_{mx} + l_{mx} k_{vz} - l_{mz} k_{vx})\mathbf e_{31} + (l_{vy} k_{mx} - l_{vx} k_{my} + l_{my} k_{vx} - l_{mx} k_{vy})\mathbf e_{12} \\ +\, &(l_{vx} k_{mx} + l_{vy} k_{my} + l_{vz} k_{mz} + l_{mx} k_{vx} + l_{my} k_{vy} + l_{mz} k_{vz}) \\ +\, &(l_{vx} k_{vx} + l_{vy} k_{vy} + l_{vz} k_{vz})\smash{\large\unicode{x1d7d9}}\end{split}$$ Rotation about the line containing the closest points on lines $$\mathbf k$$ and $$\boldsymbol l$$ by twice the angle between the directions $$(l_{vx}, l_{vy}, l_{vz})$$ and $$(k_{vx}, k_{vy}, k_{vz})$$, and translation by twice the distance between the lines in the direction from $$\mathbf k$$ to $$\boldsymbol l$$.

$$\mathbf k = k_{vx} \mathbf e_{41} + k_{vy} \mathbf e_{42} + k_{vz} \mathbf e_{43} + k_{mx} \mathbf e_{23} + k_{my} \mathbf e_{31} + k_{mz} \mathbf e_{12}$$

$$\boldsymbol l = l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} + l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12}$$

$$\mathbf q \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{p}}} = (q_xp_w - p_xq_w)\mathbf e_{23} + (q_yp_w - p_yq_w)\mathbf e_{31} + (q_zp_w - p_zq_w)\mathbf e_{12} + (p_wq_w)\smash{\large\unicode{x1d7d9}}$$ Translation by twice the distance between points $$\mathbf p$$ and $$\mathbf q$$ in the direction from $$\mathbf p$$ to $$\mathbf q$$.

$$\mathbf p = p_x \mathbf e_1 + p_y \mathbf e_2 + p_z \mathbf e_3 + p_w \mathbf e_4$$

$$\mathbf q = q_x \mathbf e_1 + q_y \mathbf e_2 + q_z \mathbf e_3 + q_w \mathbf e_4$$

Norm

The bulk norm of a motor $$\mathbf Q$$ is given by

$$\left\Vert\mathbf Q\right\Vert_\unicode{x25CF} = \sqrt{\mathbf Q \mathbin{\unicode{x25CF}} \mathbf{\tilde Q}} = \sqrt{Q_{mx}^2 + Q_{my}^2 + Q_{mz}^2 + Q_{mw}^2}$$ ,

and its weight norm is given by

$$\left\Vert\mathbf Q\right\Vert_\unicode{x25CB} = \sqrt{\mathbf Q \mathbin{\unicode{x25CB}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}}\vphantom{\mathbf{\tilde Q}}} = {\large\unicode{x1D7D9}}\sqrt{Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2}$$ .

The geometric norm of a motor $$\mathbf Q$$ is thus

$$\widehat{\left\Vert\mathbf Q\right\Vert} = \sqrt{\dfrac{Q_{mx}^2 + Q_{my}^2 + Q_{mz}^2 + Q_{mw}^2}{Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2}}$$ ,

and this is equal to half the distance that the origin is moved by the operator.

A motor is unitized when $$Q_{vx}^2 + Q_{vy}^2 + Q_{vz}^2 + Q_{vw}^2 = 1$$.

Exponential Form

A motor $$\mathbf Q$$ can be expressed as the exponential of a unitized line $$\boldsymbol l$$ multiplied by $$d + \phi{\large\unicode{x1D7D9}}$$, where $$\phi$$ is half the angle of rotation about the line $$\boldsymbol l$$, and $$d$$ is half the displacement distance along the line $$\boldsymbol l$$. The exponential form can be written as

$$\mathbf Q = \exp_\unicode{x27C7}((d + \phi{\large\unicode{x1D7D9}}) \mathbin{\unicode{x27C7}} \boldsymbol l) = \cos_\unicode{x27C7}(d + \phi{\large\unicode{x1D7D9}}) + \sin_\unicode{x27C7}(d + \phi{\large\unicode{x1D7D9}}) \mathbin{\unicode{x27C7}} \boldsymbol l$$ .

This expands to

$$\mathbf Q = \boldsymbol l\sin\phi + (d \mathbin{\unicode{x27C7}} \boldsymbol l)\cos\phi - d\sin\phi + {\large\unicode{x1D7D9}}\cos\phi$$ ,

and replacing the line $$\boldsymbol l$$ with its components gives us

$$\mathbf Q = (l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} + l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12})\sin\phi + d(l_{vx} \mathbf e_{23} + l_{vy} \mathbf e_{31} + l_{vz} \mathbf e_{12})\cos\phi - d\sin\phi + {\large\unicode{x1D7D9}}\cos\phi$$ .

A motor in exponential form is always unitized, and its geometric norm can be written as

$$\widehat{\left\Vert\mathbf Q\right\Vert} = \sqrt{d^2 + (l_{mx}^2 + l_{my}^2 + l_{mz}^2)\sin^2\phi}$$ .

The quantity $$d + \phi{\large\unicode{x1D7D9}}$$, as a homogeneous magnitude, is the pitch of the screw transformation performed by the motor, which is the amount of translation along the screw axis per radian of rotation.

Logarithm

Given an arbitrary unitized motor $$\mathbf Q$$ with $$|Q_{vw}| < 1$$, the values of $$\boldsymbol l$$, $$d$$, and $$\phi$$ can be determined from the components of $$\mathbf Q$$, essentially taking the logarithm of a motor. First, the scalar and antiscalar terms satisfy the equations

$$Q_{mw} = -d\sin\phi$$
$$Q_{vw} = \cos\phi$$ .

Assuming that $$\phi > 0$$, we define $$s = \sin\phi = \sqrt{1 - Q_{vw}^2}$$. Then,

$$d = -\dfrac{Q_{mw}}{s}$$
$$\phi = \tan^{-1}\left(\dfrac{s}{Q_{vw}}\right)$$ .

If $$Q_{vw} = 0$$, then we assign $$\phi = \pi/2$$. If $$Q_{vw} < 0$$, then we can add $$\pi$$ to $$\phi$$ to make the angle positive, but this is not required.

The components of $$\boldsymbol l$$ are then given by

$$(l_{vx}, l_{vy}, l_{vz}) = \dfrac{1}{s}(Q_{vx}, Q_{vy}, Q_{vz})$$
$$(l_{mx}, l_{my}, l_{mz}) = \dfrac{1}{s}\left[(Q_{mx}, Q_{my}, Q_{mz}) - \dfrac{dQ_{vw}}{s}(Q_{vx}, Q_{vy}, Q_{vz})\right] = \dfrac{1}{s}\left[(Q_{mx}, Q_{my}, Q_{mz}) + \dfrac{Q_{vw} Q_{mw}}{s^2}(Q_{vx}, Q_{vy}, Q_{vz})\right]$$ .

In the special case that $$Q_{vw} = \pm 1$$, the motor must be a pure translation with $$\phi = 0$$ and $$(Q_{vx}, Q_{vy}, Q_{vz}) = (0, 0, 0)$$.

Square Root

The square root of a quaternion can be calculated by summing with the identity and renormalizing. If we attempt to do the same thing with a motor $$\mathbf Q$$, we find that it works only under certain conditions. However, such a calculation does give us a starting point from which we can make a correction for the general case.

Using the exponential form of $$\mathbf Q$$, we first examine the weight norm of $$\mathbf Q + {\large\unicode{x1D7D9}}$$ and find that

$$\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB} = \sqrt{\sin^2\phi + (\cos\phi + 1)^2} = \sqrt{\vphantom{\sin^2\phi}2 + 2Q_\smash{\large\unicode{x1D7D9}}}$$ ,

where $$Q_{\large\unicode{x1D7D9}} = \cos\phi$$. Applying the trigonometric identity $$\cos^2(\phi/2) = (1 + \cos\phi)/2$$, we can rewrite this as

$$\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB} = 2\cos(\phi/2)$$ .

Applying several more trigonometric identities, we now observe

$$\dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{2\cos(\phi/2)} = \boldsymbol l\sin(\phi/2) + \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\cos(\phi/2) - \dfrac{d}{2}\sin(\phi/2) + {\large\unicode{x1D7D9}}\cos(\phi/2) - \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\sin(\phi/2)\tan(\phi/2) - \dfrac{d}{2}\sin(\phi/2)$$ .

The first four terms are exactly the square root of $$\mathbf Q$$ because the distance $$d$$ and angle $$\phi$$ have both been halved. But there are two additional terms that we need to eliminate. It just so happens that

$$\dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}} \mathbin{\unicode{x27C7}} \dfrac{d}{2}\tan(\phi/2) = \left(\dfrac{d}{2} \mathbin{\unicode{x27C7}} \boldsymbol l\right)\sin(\phi/2)\tan(\phi/2) + \dfrac{d}{2}\sin(\phi/2)$$ ,

which means that

$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} \mathbin{\unicode{x27C7}} \left({\large\unicode{x1D7D9}} + \dfrac{d}{2}\tan(\phi/2)\right)$$ .

The scalar component of $$\mathbf Q$$ can be rewritten as $$Q_{\mathbf 1} = -d\sin\phi = -2d\sin(\phi/2)\cos(\phi/2) $$. Dividing this by $$2 + 2Q_{\large\unicode{x1D7D9}} = 4\cos^2(\phi/2)$$ yields

$$\dfrac{Q_\mathbf 1}{2 + 2Q_{\large\unicode{x1D7D9}}} = -\dfrac{d}{2}\tan(\phi/2)$$ .

The square root of a general motor $$\mathbf Q$$ is thus given by

$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} \mathbin{\unicode{x27C7}} \left({\large\unicode{x1D7D9}} - \dfrac{Q_\mathbf 1}{2 + 2Q_{\large\unicode{x1D7D9}}}\right)$$ .

If $$\mathbf Q$$ is a simple motor, then $$Q_{\mathbf 1} = 0$$, and this reduces to

$$\sqrt{\mathbf Q} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\sqrt{2 + 2Q_\smash{\large\unicode{x1D7D9}}}} = \dfrac{\mathbf Q + {\large\unicode{x1D7D9}}}{\left\Vert\mathbf Q + \smash{\large\unicode{x1D7D9}}\right\Vert_\unicode{x25CB}}$$ .

Factorization

Any unitized motor $$\mathbf Q$$ can be factored into the product of a motor $$\mathbf R = Q_{vx} \mathbf e_{41} + Q_{vy} \mathbf e_{42} + Q_{vz} \mathbf e_{43} + Q_{vw} {\large\unicode{x1D7D9}}$$ corresponding to a pure rotation about a line through the origin and a motor $$\mathbf T = {t_x \mathbf e_{23} + t_y \mathbf e_{31} + t_z \mathbf e_{12} + \large\unicode{x1d7d9}}$$ corresponding to a pure translation by calculating

$$\mathbf T = \mathbf Q \mathbin{\unicode{x27C7}} \mathbf{\underset{\Large\unicode{x7E}}{R}}$$ .

The motor $$\mathbf T$$ is then given by

$$\mathbf T = (Q_{vy} Q_{mz} - Q_{vz} Q_{my} + Q_{mx} Q_{vw} - Q_{vx} Q_{mw})\mathbf e_{23} + (Q_{vz} Q_{mx} - Q_{vx} Q_{mz} + Q_{my} Q_{vw} - Q_{vy} Q_{mw})\mathbf e_{31} + (Q_{vx} Q_{my} - Q_{vy} Q_{mx} + Q_{mz} Q_{vw} - Q_{vz} Q_{mw})\mathbf e_{12} + {\large\unicode{x1d7d9}}$$ .

The original motor $$\mathbf Q$$ can now be expressed as

$$\mathbf Q = \mathbf T \mathbin{\unicode{x27C7}} \mathbf R$$ ,

where both $$\mathbf R$$ and $$\mathbf T$$ are unitized simple motors.

Conversion from Motor to Matrix

Given a specific unitized motor $$\mathbf Q$$, define the matrices

$$\mathbf A = \begin{bmatrix}1 - 2(Q_{vy}^2 + Q_{vz}^2) & 2Q_{vx} Q_{vy} & 2Q_{vz} Q_{vx} & 2(Q_{vy} Q_{mz} - Q_{vz} Q_{my}) \\ 2Q_{vx} Q_{vy} & 1 - 2(Q_{vz}^2 + Q_{vx}^2) & 2Q_{vy} Q_{vz} & 2(Q_{vz} Q_{mx} - Q_{vx} Q_{mz}) \\ 2Q_{vz} Q_{vx} & 2Q_{vy} Q_{vz} & 1 - 2(Q_{vx}^2 + Q_{vy}^2) & 2(Q_{vx} Q_{my} - Q_{vy} Q_{mx}) \\ 0 & 0 & 0 & 1\end{bmatrix}$$

and

$$\mathbf B = \begin{bmatrix}0 & -2Q_{vz} Q_{vw} & 2Q_{vy} Q_{vw} & 2(Q_{vw} Q_{mx} - Q_{vx} Q_{mw}) \\ 2Q_{vz} Q_{vw} & 0 & -2Q_{vx} Q_{vw} & 2(Q_{vw} Q_{my} - Q_{vy} Q_{mw}) \\ -2Q_{vy} Q_{vw} & 2Q_{vx} Q_{vw} & 0 & 2(Q_{vw} Q_{mz} - Q_{vz} Q_{mw}) \\ 0 & 0 & 0 & 0\end{bmatrix}$$ .

Then the corresponding 4×4 matrix $$\mathbf M$$ that transforms a point $$\mathbf p$$, regarded as a column matrix, as $$\mathbf p' = \mathbf{Mp}$$ is given by

$$\mathbf M = \mathbf A + \mathbf B$$ .

The inverse of $$\mathbf M$$, which transforms a plane $$\mathbf g$$, regarded as a row matrix, as $$\mathbf g' = \mathbf{gM^{-1}}$$ is given by

$$\mathbf M^{-1} = \mathbf A - \mathbf B$$ .

Conversion from Matrix to Motor

Let $$\mathbf M$$ be an orthogonal 4×4 matrix with determinant +1 having the form

$$\mathbf M = \begin{bmatrix} M_{00} & M_{01} & M_{02} & M_{03} \\ M_{10} & M_{11} & M_{12} & M_{13} \\ M_{20} & M_{21} & M_{22} & M_{23} \\ 0 & 0 & 0 & 1\end{bmatrix}$$ .

Then, by equating the entries of $$\mathbf M$$ to the entries of $$\mathbf A + \mathbf B$$ from above, we have the following four relationships based on the diagonal entries of $$\mathbf M$$:

$$M_{00} - M_{11} - M_{22} + 1 = 4Q_{vx}^2$$
$$M_{11} - M_{22} - M_{00} + 1 = 4Q_{vy}^2$$
$$M_{22} - M_{00} - M_{11} + 1 = 4Q_{vz}^2$$
$$M_{00} + M_{11} + M_{22} + 1 = 4(1 - Q_{vx}^2 - Q_{vy}^2 - Q_{vz}^2) = 4Q_{vw}^2$$

And we have the following six relationships based on the off-diagonal entries of $$\mathbf M$$:

$$M_{21} + M_{12} = 4Q_{vy} Q_{vz}$$
$$M_{02} + M_{20} = 4Q_{vz} Q_{vx}$$
$$M_{10} + M_{01} = 4Q_{vx} Q_{vy}$$
$$M_{21} - M_{12} = 4Q_{vx} Q_{vw}$$
$$M_{02} - M_{20} = 4Q_{vy} Q_{vw}$$
$$M_{10} - M_{01} = 4Q_{vz} Q_{vw}$$

If $$M_{00} + M_{11} + M_{22} \geq 0$$, then we calculate

$$Q_{vw} = \pm \dfrac{1}{2}\sqrt{M_{00} + M_{11} + M_{22} + 1}$$ ,

where either sign can be chosen. In this case, we know $$|Q_{vw}|$$ is at least $$1/2$$, so we can safely divide by $$4Q_{vw}$$ in the last three off-diagonal relationships above to solve for $$Q_{vx}$$, $$Q_{vy}$$, and $$Q_{vz}$$. Otherwise, if $$M_{00} + M_{11} + M_{22} < 0$$, then we select one of the first three diagonal relationships based on the largest diagonal entry $$M_{00}$$, $$M_{11}$$, or $$M_{22}$$. After calculating $$Q_{vx}$$, $$Q_{vy}$$, or $$Q_{vz}$$, we plug its value into two of the first three off-diagonal relationships to solve for the other two values of $$Q_{vx}$$, $$Q_{vy}$$, and $$Q_{vz}$$. Finally, we plug it into one of the last three off-diagonal relationships to solve for $$Q_{vw}$$.

Setting $$t_x = M_{03}$$, $$t_y = M_{13}$$, and $$t_z = M_{23}$$, the values of $$Q_{mx}$$, $$Q_{my}$$, $$Q_{mz}$$, and $$Q_{mw}$$ are given by

$$Q_{mx} = \dfrac{1}{2}(Q_{vw} t_x + Q_{vz} t_y - Q_{vy} t_z)$$

$$Q_{my} = \dfrac{1}{2}(Q_{vw} t_y + Q_{vx} t_z - Q_{vz} t_x)$$

$$Q_{mz} = \dfrac{1}{2}(Q_{vw} t_z + Q_{vy} t_x - Q_{vx} t_y)$$

$$Q_{mw} = -\dfrac{1}{2}(Q_{vx} t_x + Q_{vy} t_y + Q_{vz} t_z)$$ .

Motor Transformations

Points, lines, and planes are transformed by a unitized motor $$\mathbf Q$$ as shown in the following table.

Type Transformation
Point

$$\mathbf p = p_x \mathbf e_1 + p_y \mathbf e_2 + p_z \mathbf e_3 + p_w \mathbf e_4$$

$$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \mathbf p \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)p_x + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})p_y + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})p_z + 2(Q_{vy}Q_{mz} - Q_{vz}Q_{my} + Q_{vw}Q_{mx} - Q_{vx}Q_{mw})p_w\right]\mathbf e_1 \\ +\, &\left[(1 - 2Q_{vz}^2 -2Q_{vx}^2))p_y + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})p_z + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})p_x + 2(Q_{vz}Q_{mx} - Q_{vx}Q_{mz} + Q_{vw}Q_{my} - Q_{vy}Q_{mw})p_w\right]\mathbf e_2 \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2))p_z + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})p_x + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})p_y + 2(Q_{vx}Q_{my} - Q_{vy}Q_{mx} + Q_{vw}Q_{mz} - Q_{vz}Q_{mw})p_w\right]\mathbf e_3 \\ +\, &p_w\mathbf e_4\end{split}$$
Line

$$\begin{split}\boldsymbol l =\, &l_{vx} \mathbf e_{41} + l_{vy} \mathbf e_{42} + l_{vz} \mathbf e_{43} \\ +\, &l_{mx} \mathbf e_{23} + l_{my} \mathbf e_{31} + l_{mz} \mathbf e_{12}\end{split}$$

$$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \boldsymbol l \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)l_{vx} + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})l_{vy} + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})l_{vz}\right]\mathbf e_{41} \\ +\, &\left[(1 - 2Q_{vz}^2 - 2Q_{vx}^2)l_{vy} + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})l_{vz} + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})l_{vx}\right]\mathbf e_{42} \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2)l_{vz} + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})l_{vx} + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})l_{vy}\right]\mathbf e_{43} \\ +\, &\left[-4(Q_{vy}Q_{my} + Q_{vz}Q_{mz})l_{vx} + 2(Q_{vy}Q_{mx} + Q_{vx}Q_{my} - Q_{vz}Q_{mw} - Q_{vw}Q_{mz})l_{vy} + 2(Q_{vz}Q_{mx} + Q_{vx}Q_{mz} + Q_{vy}Q_{mw} + Q_{vw}Q_{my})l_{vz} + (1 - 2Q_{vy}^2 - 2Q_{vz}^2)l_{mx} + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})l_{my} + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})l_{mz}\right]\mathbf e_{23} \\ +\, &\left[-4(Q_{vz}Q_{mz} + Q_{vx}Q_{mx})l_{vy} + 2(Q_{vz}Q_{my} + Q_{vy}Q_{mz} - Q_{vx}Q_{mw} - Q_{vw}Q_{mx})l_{vz} + 2(Q_{vx}Q_{my} + Q_{vy}Q_{mx} + Q_{vz}Q_{mw} + Q_{vw}Q_{mz})l_{vx} + (1 - 2Q_{vz}^2 - 2Q_{vx}^2)l_{my} + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})l_{mz} + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})l_{mx}\right]\mathbf e_{31} \\ +\, &\left[-4(Q_{vx}Q_{mx} + Q_{vy}Q_{my})l_{vz} + 2(Q_{vx}Q_{mz} + Q_{vz}Q_{mx} - Q_{vy}Q_{mw} - Q_{vw}Q_{my})l_{vx} + 2(Q_{vy}Q_{mz} + Q_{vz}Q_{my} + Q_{vx}Q_{mw} + Q_{vw}Q_{mx})l_{vy} + (1 - 2Q_{vx}^2 - 2Q_{vy}^2)l_{mz} + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})l_{mx} + 2(Q_{vy}Q_{vz} + 2Q_{vx}Q_{vw})l_{my}\right]\mathbf e_{12}\end{split}$$
Plane

$$\mathbf g = g_x \mathbf e_{423} + g_y \mathbf e_{431} + g_z \mathbf e_{412} + g_w \mathbf e_{321}$$

$$\begin{split}\mathbf Q \mathbin{\unicode{x27C7}} \mathbf g \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{Q}}} =\, &\left[(1 - 2Q_{vy}^2 - 2Q_{vz}^2)g_x + 2(Q_{vx}Q_{vy} - Q_{vz}Q_{vw})g_y + 2(Q_{vz}Q_{vx} + Q_{vy}Q_{vw})g_z\right]\mathbf e_{423} \\ +\, &\left[(1 - 2Q_{vz}^2 - 2Q_{vx}^2)g_y + 2(Q_{vy}Q_{vz} - Q_{vx}Q_{vw})g_z + 2(Q_{vx}Q_{vy} + Q_{vz}Q_{vw})g_x\right]\mathbf e_{431} \\ +\, &\left[(1 - 2Q_{vx}^2 - 2Q_{vy}^2)g_z + 2(Q_{vz}Q_{vx} - Q_{vy}Q_{vw})g_x + 2(Q_{vy}Q_{vz} + Q_{vx}Q_{vw})g_y\right]\mathbf e_{412} \\ +\, &\left[2(Q_{vy}Q_{mz} - Q_{vz}Q_{my} + Q_{vx}Q_{mw} - Q_{vw}Q_{mx})g_x + 2(Q_{vz}Q_{mx} - Q_{vx}Q_{mz} + Q_{vy}Q_{mw} - Q_{vw}Q_{my})g_y + 2(Q_{vx}Q_{my} - Q_{vy}Q_{mx} + Q_{vz}Q_{mw} - Q_{vw}Q_{mz})g_z + g_w\right]\mathbf e_{321}\end{split}$$

See Also