Chiromancy in the rotation group

When we travel by a car, we decide which path to take. Choosing the right path may be crucial. Sometimes we choose a path that is straight, but nevertheless is scary. Like this road in Nebraska:

Sometimes the path is just “unusual”:

And sometimes we will think twice before choosing it:

We are interested in a particular kind of traveling: we want to travel in the rotation group. Think of an airplane. When it flies, it of course moves from a location to a location. But that is not what is of interest for us now. During the flight the plane turns and tilts, and all its turns and tilts can be (and often are) recorded. There are essentially three parameters that need to be recorded:

Usually they are referred to as roll, pitch and yaw. When you throw a stone in the air, and if you endow it with three axes, its roll, pitch, and yaw will also change with time. As there are three parameters, they can be represented by a point moving in a three-dimensional space. Instead of roll, pitch and yaw we could choose Euler angles. But, in fact, we will choose still another way of representing a history of tilts and turns of a rigid object as a path. We will use stereographic projection from the 3-dimensional sphere to the 3-dimensional Euclidean space.

You may ask: why to do it? What is the point? What can we learn from it? And my answer is: for fun.
One can also ask: what is the point with inspecting your hand? And yet there is the whole art of chiromancy, or palmistry. From Wikipedia:

Chiromancy consists of the practice of evaluating a person’s character or future life by “reading” the palm of that person’s hand. Various “lines” (“heart line”, “life line”, etc.) and “mounts” (or bumps) (chirognomy) purportedly suggest interpretations by their relative sizes, qualities, and intersections. In some traditions, readers also examine characteristics of the fingers, fingernails, fingerprints, and palmar skin patterns (dermatoglyphics), skin texture and color, shape of the palm, and flexibility of the hand.

We are going to learn about the lines in the rotation group. Some will be short, some will be long. We will learn how read from them about the body that recorded these lines during its flight.

From the internet we can learn:

Which Hand to Read
Before reading your palm, you should choose the right hand to read. There are different schools of thought on this matter. Some people think the right for female and left for male. As a matter of fact, both of your hands play great importance in hand reading. But one is dominant and the other is passive. The left hand usually represents what you were born with physically and materially and the right hand represents what you become after grown up. So, the right hand is dominant in palm reading and the left for supplement.

The same is with rotation groups. Which one to choose? We have rotations represented naturally as 3\times 3 orthogonal matrices, but we can also represent rotations by quaternions or by unitary matrices from the group \mathrm{SU}(2). Both play a great importance. We will choose unit quaternions or, equivalently, \mathrm{SU}(2), they seem to be primary!

Let us recall from Putting a spin on mistakes that every 2\times 2 unitary matrix U of determinant one is necessarily of the form

(1)   \begin{equation*}U=\begin{bmatrix}W+iZ&iX-Y\\iX+Y&W-iZ}\end{bmatrix}.\end{equation*}

and it determines the rotation matrix R(U):

(2)   \begin{equation*} R(U)=\begin{bmatrix} W^2+X^2-Y^2-Z^2&2(XY-WZ)&2(WY+XZ)\\ 2(WZ+XY&W^2-X^2+Y^2-Z^2&2(YZ-WX)\\ 2(XZ-WY)&2(WX+YZ)&W^2-X^2-Y^2+Z^2 \end{bmatrix}, \end{equation*}

where W,X,Y,Z are real numbers representing a point on the three-dimensional unit sphere S^3 in the 4-dimenional Euclidean space \mathbf{R}^4, that is

(3)   \begin{equation*}W^2+X^2+Y^2+Z^2=1.\end{equation*}

The three-sphere S^3 is “homogeneous”, the same as the well-known two-sphere, like a table tennis ball.

And yet I want to paint one particular point on our three-sphere, namely the point represented by numbers W=1,X=Y=Z=0. It follows from Eq. (2) that the rotation matrix corresponding to this particular point is the identity matrix:

    \[I=\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}.\]

I am not going to hide the fact that also the opposite point, W=-1,X=Y=Z=0, on our 3D ball also produces the identity rotation matrix, that is, in ordinary language: no rotation at all.

We are going now to go back to the stereographic projection that has been introduced already in Dzhanibekov effect – Part 2.

The idea is as in the picture below:

except that our sphere is 3-dimensional, and our plane onto which we are projecting is also 3-dimensional. Our North Pole is now the point W=1,X=Y=Z=0, our South Pole the point W=-1,X=Y=Z=0, and our “equator”, that is the set of all points on S^3 for which W=0 is now a 2-sphere rather than a circle like on the picture above. The projection formulas read (see Dzhanibekov effect – Part 2):

(4)   \begin{eqnarray*} x=\frac{X}{1-W},\\ y=\frac{Y}{1-W},\\ z=\frac{X}{1-W}. \end{eqnarray*}

The inverse transformation is given by

(5)    \begin{eqnarray*} W&=&\frac{r^2-1}{r^2+1},\\ X&=&\frac{2x}{r^2+1},\\ Y&=&\frac{2y}{r^2+1},\\ Z&=&\frac{2z}{r^2+1}, \end{eqnarray*}

where r^2=x^2+y^2+z^2.

All the southern hemisphere (points on S^3 with W<0 are projected inside the unit ball in \mathbf{R}^3! The “equator”, where the three-sphere intersects the three-plane, is projected onto the unit sphere in \mathbf{R}^3. The North Pole has no image, it is the only point on S^3 that has no image. In fact, it has an image, but at “infinity”. We will not need it. The South Pole, which, as we know, represents the trivial rotation, is mapped into the origin of \mathbf{R}^3, the point with x=y=z=0.
We will continue this course of rotational palmistry in the next posts.

Elliptic Pi in Mathematica and Maple

We use EllipticPi when we write exact solutions of rotation of a free asymmetric top. While solving Euler’s equations for angular velocity or angular momentum in the body frame we need Jacobi elliptic functions \cn,\sn,\dn, solving the differential equation for the attitude matrix involves EllipticPi function. As I have explained it in Taming the T-handle continued we need the integral

(1)   \begin{equation*}\psi(t)=c_1 t+c_2\int_0^t \frac{1}{1+c_3\,\sn^2(Bs,m)}\,ds.\end{equation*}

In Mathematica this is easily implemented as

(2)   \begin{equation*}\psi(t)=c_1 t+\frac{c_2}{B}\,\Pi(-c_3;\am(Bt,m)|m).\end{equation*}

However, as pointed out by Rowan in a comment to Taming the T-handle continued , the same formula does not work with Maple.

While the documentations of both Mathematica and Maple contain links to Abramowitz and Stegun Handbook of Mathematical Functions, they use different definitions. Here is what concerns us, from p. 590 of the 10th printing:

What we need is 17.2.16, while Maple is using 17.2.14. To convert we need to set x=\sn u, but such a conversion is possible only in the domain where \sn can be inverted. We can do it easily for sufficiently small values of u, but not necessarily for values that contain several quarter-periods.

The following Maple procedure does the job:


epi := proc (t::float, nu::float, k::float) local t2, n, dt, ep0, res; ep0 := EllipticPi(nu, k); t2 := EllipticK(k); n := floor(t/t2); dt := t-t2*n; if type(n, even) then res := Re(n*ep0+EllipticPi(JacobiSN(dt, k), nu, k)) else res := Re((1+n)*ep0-EllipticPi(JacobiSN(t2-dt, k), nu, k)) end if end proc

HAs an example here is the Maple plot for nu=-3, k=0.9:
plot(('epi')(t, -3.0, .9), t = -20 .. 20)

And here is the corresponding Mathematica plot:

The function epi(t,nu, k) defined above for Maple gives now the same result as EllipticPi(nu,JacobiAM(t,k^2),k^2) in Mathematica.