Rotations: from one Euler angle sequence to another

Let’s suppose we are given an Euler angle sequence ZYX with angles

as = {0.2, 0.25, 0.3}

We have been asked to convert that to ZYZ.

(You probably want to have read the previous quaternion posts.) I will remind us that the notation ZYX means the rotation

Rx Ry Rz,

with the Z-axis rotation first; and I write the angles in the same order, ZYX,, so the given rotation is

m0 = Rx(.3) Ry(.25) Rz(.2).

We do not need to compute it, but we might as well; if for no better reason than that we will be able to check our answer. The rotation matrix for the given Euler angle sequence works out to:

m0 = \left(\begin{array}{ccc} 0.949599 & 0.192493 & -0.247404 \\ -0.118141 & 0.950819 & 0.286333 \\ 0.290353 & -0.242673 & 0.925637\end{array}\right)
Read the rest of this entry »

Happenings โ€“ 2010 Aug 28

I continued working on linear programming and quaternions last weekend and a little during this week.

As I said last week, I know how to get “the final tableau” of a linear programming problem using only the problem statement (“the initial tableau”) and the optimal solution.

What I’ve been working on is “sensitivity analysis”, which requires the final tableau. Although I know most of the rules, I’m still trying to fully understand exactly why the rules work. I’m also, in the back of my mind, composing an introduction to linear programming problems.

The story with quaternions is different… I thought I was done with them. But then someone posted a question about them on the sci.math newsgroup… and I thought it was an interesting application of all the work I had already done.
Read the rest of this entry »

Rotations, especially Euler angle sequences

In this post, I simply want to play with the Euler angle representations of some rotations. This is not a thorough test suite, merely a handful of different cases:

  1. for a random rotation…
  1. ZYX
  2. ZXZ
  • ZXZ for…
    1. x-axis rotation
    2. y-axis rotation
    3. z-axis rotation
  • ZYX for…
    1. x-axis rotation
    2. y-axis rotation
    3. z-axis rotation

    A random orthogonal matrix

    In the previous post, we worked an example starting from a given Euler angle sequence of the form ZYX. This time, let’s begin with a random matrix. By issuing the command
    Read the rest of this entry »

    Happenings โ€“ 2010 Aug 21

    I expect to be drafting another post on quaternions today… mostly examples.

    But what I’ve been putting time into when I could during the week, is linear programming.

    Speaking for myself, I would say: forget about the specific linear programming functions in Mathematicaยฎ. Instead, just use Minimize or NMinimize (resp. Maximize or NMaximize).

    No matter what we use in Mathematica, however, we face the problem that we get the optimal solution, but sensitivity analysis requires that we have what’s called the “final tableau”… and Mathematica doesn’t give that to us.

    Well, it turns out that we can construct the final tableau from the initial tableau โ€“ which is just the problem statement, after all โ€“ and the optimal solution.

    I’m looking forward to showing you how to do that.

    It turns out that what I’m doing in linear programming, and what I’ve just done in quaternions, have something in common. They are both problems that I put down about five years ago, because I had gone as far as I could, or wanted. You might say, I’d had enough, and other things looked more interesting.
    Read the rest of this entry »

    Quaternions and Rotations 2: Euler angles etc.

    Let me create a simple example. You may want to have read Quaternions and Rotations 1, and the introductory post as well.

    I will specify an Euler angle sequence, “ZYX”, with angles:

    The notation “ZYX” means that we first rotate about the z-axis, then about y, then about x; and I choose to let the angles be in the same order. This is typically used in aerospace applications. The other Euler angle sequence common in my experience is “ZXZ” for orbits. Altogether, I count 12 kinds: three choices for the first axis, two for the second, and two for the third. There is no point in choosing consecutive axes the same, because consecutive rotations about the same axis are equivalent to one rotation, through the sum of the angles, about that axis.

    The obvious first step is to construct the combined rotation matrix for that Euler angle sequence, but I’m going to go in a different order. I’m going to test all 8 transformations among rotation matrices, angle/axis, quaternion, and Euler angle sequences.

    What the heck? Pictures are good.

    Read the rest of this entry »

    Happenings โ€“ 2010 Aug 14

    Well, I’ve been playing a time-wasting computer game… an old DOS game called Ascendancy…. It required that I re-install Windows on my Mac, which is the only reason I haven’t been wasting even more time! Grrr!

    Still, I looked at a little math during the week.
    Read the rest of this entry »

    Quaternions and Rotations 1

    What I’m heading for is to compute the following eight transformations (shown by arrows) among representations of a 3D rotation.

    Let me begin by talking about rotations generally (see rotations 1 for more detail).
    Read the rest of this entry »

    Happenings โ€“ 2010 Aug 7

    Okay, the introductory quaternions post went out last Monday. This weekend I expect to write about all four representations of three-dimensional rotations: rotation matrices, angle & axis of rotation, quaternions, and Euler angle decompositions.

    I wasn’t sure last weekend what I would do besides quaternions… it turned out to be a control systems simulation. Nothing fancy… okay, it was a fairly complicated “plant” being hit with a rectangular wave (bang-bang). I was just trying to duplicate something in a book. The challenge was that the book (Ellis) expected me to be using its companion software on a pre-defined “experiment”… and did not provide all the parameters for an independent simulation.

    It was nice to see that I could do it with Mathematicaยฎ.

    Nevertheless, my mathematical life appears to have gotten more complicated.
    Read the rest of this entry »

    Posted in diary. 2 Comments »

    Quaternions: introduction

    Introduction

    Let me start by listing three references, none of which has everything I would want.

    1. Kuipers’ “Quaternions and Rotation Sequences” is on my bibliographies page.
    2. Kantor and Solodovnikov’s “Hypercomplex Numbers: An Elementary Introduction to Algebras” (Springer 1989, 0 387 96980 2) puts quaternions in the context of number systems.
    3. Pertti Lounesto’s “Clifford Algebras and Spinors” (Cambridge 1997, 0 521 59916 4) had one result I wanted, namely a complex matrix representation. I wouldn’t recommend this book for quaternions, but I find it indispensible for clifford algebras.

    Quaternions were invented by William Rowan Hamilton on October 16, 1843. He may have considered them the greatest achievement of his rather stellar mathematical career. He had been looking for a 3D analog of the complex numbers; we know today that the properties he was hoping to find can only hold in dimensions 1,2,4,8. (They give us the real numbers, the complex numbers, the quaternions, and the octonions.)

    The simplest way to define a quaternion is to write

    q = a + b I + c J + d K,

    where a,b,c,d are real numbers, and the symbols I, J, K have the following properties:

    I^2 = J^2 = K^2 = I\ J\ K = -1\ .

    That should remind you of the complex numbers: z = a + b I, with I^2 = -1\ . We have two additional imaginary units, and there is one additional property relating all three of them.
    Read the rest of this entry »