Identifying if 2 motors are "compatible." (no candy wrapping)

90 Views Asked by At

Preamble (Trying to describe candywrapping)

Consider a translation and rotation encoded as a motor in $Cl(3, 0, 1)$, also known as PGA.

All rotations in 3D can be considered to be a planar rotation up to a choice of basis, in which one vector rotates to meet another vector.

Say $v_1$ rotates to align with $v_2$. Let $R_1$ denote a rotation that aligns the 2 vectors, such as in the ugly diagram below.

enter image description here

Note that after they have been aligned, the lie on an axis. Any rotation around this axis leaves the transformed vector unchanged, that is if $R'$ is a rotation around the axis, then $R'(R_1(v_1)) = R_1(v_1)$.

But any point not in the direction of $v_1$ on the input will end in different locations depending on what $R'$ is.

So consider not just $v_1$ but an orthogonal vector to it $u_1$.

Consider now a second motor $R_2$ that takes the output of $R_1$ and applies another transformation to it.

If $R_2$ "twists" axially relative to $R_1$ then if one were to blend both transforms together, you would observe that the space around both motors blends into what is sometimes called a "candy wrapper effect".

It sort of looks like this:

enter image description here

In here $R_1$ transforms two orthogonal vectors in such a way that they end in the left configuration, $R_2$ then transforms them into the second configuration. Points directly on the horizontal axis merely experience a translation, but points outside that line will spin around the axis as the influence of the second motor overtakes the first.

Problem

With this described, I have 2 motors that are getting blended, as described above. I need to test if the above twisting would occur, and if it would, I need to modify one of the two motors such that points on the axis $tv_1, t \in \mathbb{R}$ are transformed exactly the same, but the twisting around (the candywrapping) is minimized.

What should I do? (I am very inexperienced with PGA and clifford algebras)

1

There are 1 best solutions below

0
On

This isn't an answer but is too long for a comment.

If you are combining motors via $(1-t)R_1 + tR_2$, then that is wrong; motors are not closed under addition, or at least addition is not very meaningful. You need to instead interpolate their logarithms: $R_1 = e^{B_1}$ and $R_2 = e^{B_2}$, then their interpolation is $e^{(1-t)B_1 + tB_2}$.

I am not sure if this is related to your problem, but have a look at Skinning with Dual Quaternions by Kavan, Collins, Zara, and O'Sullivan. See also Skin Deformation Methods for Interactive Character Animation by Rumman and Fractarcangeli for more of a general overview, which references it. The even subalgebra of PGA is the dual quaternions (and hence PGA motors as well). These papers are concerned with blending the rigid motions of bones attached to a vertex to produce a corresponding rigid motion for that vertex; candy-wrapping is a possible artifact from linearly blending rotation matrices. Kavan-Collins-Zara-O'Sullivan say that simply using motors instead eliminates candywrapping: if we have two bones moving under motors $R_1, R_2$ attached at a vertex $v$, then transforming $v$ with $$ \frac{w_1R_1 + w_2R_2}{\sqrt{(w_1\widetilde R_1 + w_2\widetilde R_2)(w_1R_1 + w_2R_2)}} $$ produces no candy-wrapping. ($w_1,w_2\in\mathbb R$ are weights to allow one motor to be more important.) Something worth considering is blending the logarithms instead, so that if $R_1 = e^{B_1}$ and $R_2 = e^{B_2}$ then we would transform $v$ with $$ e^{(B_1 + B_2)/\sqrt{-(B_1 + B_2)^2}}. $$ Note that if $B_1, B_2$ represent pure translations then the denominator is zero; but of course in this case the arm would get ripped apart at the vertex if $R_1 \not= \pm R_2$, which would be quite bad.

Something else that may be helpful is understanding rigid body mechanics in PGA. See May the Forque be with You! by Leo Dorst and Steven De Keninck. Two notes however:

  1. When the authors are introducing the bivector velocity of a time-dependent motor $M$, their notation suggests that if $M = e^{-B/2}$ then this velocity is just $B$; this is incorrect.
  2. The authors represent Euclidean vectors as PGA vectors (planes) through a fixed origin; this is geometrically incorrect for a couple of reasons. However, the more geometrically acceptable use of ideal points as vectors requires much more explanation, so I find this practice permissable.