Rotation formalisms in three dimensions

Short description: Ways to represent 3D rotations

In geometry, various formalisms exist to express a rotation in three dimensions as a mathematical transformation. In physics, this concept is applied to classical mechanics where rotational (or angular) kinematics is the science of quantitative description of a purely rotational motion. The orientation of an object at a given instant is described with the same tools, as it is defined as an imaginary rotation from a reference placement in space, rather than an actually observed rotation from a previous placement in space.

According to Euler's rotation theorem, the rotation of a rigid body (or three-dimensional coordinate system with a fixed origin) is described by a single rotation about some axis. Such a rotation may be uniquely described by a minimum of three real parameters. However, for various reasons, there are several ways to represent it. Many of these representations use more than the necessary minimum of three parameters, although each of them still has only three degrees of freedom.

An example where rotation representation is used is in computer vision, where an automated observer needs to track a target. Consider a rigid body, with three orthogonal unit vectors fixed to its body (representing the three axes of the object's local coordinate system). The basic problem is to specify the orientation of these three unit vectors, and hence the rigid body, with respect to the observer's coordinate system, regarded as a reference placement in space.

## Contents

* 1 Rotations and motions
* 2 Formalism alternatives
* 2.1 Rotation matrix
* 2.2 Euler axis and angle (rotation vector)
* 2.3 Euler rotations
* 2.4 Quaternions
* 2.5 Rodrigues vector
* 2.6 Cayley–Klein parameters
* 2.7 Higher-dimensional analogues
* 2.8 Vector transformation law
* 3 Conversion formulae between formalisms
* 3.1 Rotation matrix ↔ Euler angles
* 3.1.1 Rotation matrix → Euler angles (z-x-z extrinsic)
* 3.1.2 Euler angles (z-y′-x″ intrinsic) → rotation matrix
* 3.2 Rotation matrix ↔ Euler axis/angle
* 3.3 Rotation matrix ↔ quaternion
* 3.4 Euler angles ↔ quaternion
* 3.4.1 Euler angles (z-x-z extrinsic) → quaternion
* 3.4.2 Euler angles (z-y′-x″ intrinsic) → quaternion
* 3.4.3 Quaternion → Euler angles (z-x-z extrinsic)
* 3.4.4 Quaternion → Euler angles (z-y′-x″ intrinsic)
* 3.5 Euler axis–angle ↔ quaternion
* 3.6 Rotation matrix ↔ Rodrigues vector
* 3.6.1 Rodrigues vector → Rotation matrix
* 4 Conversion formulae for derivatives
* 4.1 Rotation matrix ↔ angular velocities
* 4.2 Quaternion ↔ angular velocities
* 5 Rotors in a geometric algebra
* 6 Angle-angle-angle
* 6.1 Quaternion representation
* 6.2 Basis matrix computation
* 6.3 Alternate basis calculation
* 6.4 Vector rotation
* 6.5 Rotate a rotation vector
* 6.6 Spin rotation around a fixed axis
* 6.7 Conversion from Basis Matrix
* 6.8 Conversion from normal vector (Y)
* 6.8.1 Align normal using basis
* 6.8.2 Align normal directly
* 6.9 Conversion from axis-angle
* 7 See also
* 8 References
* 9 Further reading
* 10 External links

## Rotations and motions

Rotation formalisms are focused on proper (orientation-preserving) motions of the Euclidean space with one fixed point, that a rotation refers to. Although physical motions with a fixed point are an important case (such as ones described in the center-of-mass frame, or motions of a joint), this approach creates a knowledge about all motions. Any proper motion of the Euclidean space decomposes to a rotation around the origin and a translation. Whichever the order of their composition will be, the "pure" rotation component wouldn't change, uniquely determined by the complete motion.

One can also understand "pure" rotations as linear maps in a vector space equipped with Euclidean structure, not as maps of points of a corresponding affine space. In other words, a rotation formalism captures only the rotational part of a motion, that contains three degrees of freedom, and ignores the translational part, that contains another three.

When representing a rotation as numbers in a computer, some people prefer the quaternion representation or the axis+angle representation, because they avoid the gimbal lock that can occur with Euler rotations.[1]

## Formalism alternatives

### Rotation matrix

The above-mentioned triad of unit vectors is also called a basis. Specifying the coordinates (components) of vectors of this basis in its current (rotated) position, in terms of the reference (non-rotated) coordinate axes, will completely describe the rotation. The three unit vectors, û, v̂ and ŵ, that form the rotated basis each consist of 3 coordinates, yielding a total of 9 parameters.

These parameters can be written as the elements of a 3 × 3 matrix A, called a rotation matrix. Typically, the coordinates of each of these vectors are arranged along a column of the matrix (however, beware that an alternative definition of rotation matrix exists and is widely used, where the vectors' coordinates defined above are arranged by rows[2]) 𝐀=[𝐮^x𝐯^x𝐰^x𝐮^y𝐯^y𝐰^y𝐮^z𝐯^z𝐰^z]

The elements of the rotation matrix are not all independent—as Euler's rotation theorem dictates, the rotation matrix has only three degrees of freedom.

The rotation matrix has the following properties:

* A is a real, orthogonal matrix, hence each of its rows or columns represents a unit vector.
* The eigenvalues of A are {1,e±iθ}={1, cos⁡θ+isin⁡θ, cos⁡θ−isin⁡θ} where i is the standard imaginary unit with the property i2 = −1
* The determinant of A is +1, equivalent to the product of its eigenvalues.
* The trace of A is 1 + 2 cos θ, equivalent to the sum of its eigenvalues.

The angle θ which appears in the eigenvalue expression corresponds to the angle of the Euler axis and angle representation. The eigenvector corresponding to the eigenvalue of 1 is the accompanying Euler axis, since the axis is the only (nonzero) vector which remains unchanged by left-multiplying (rotating) it with the rotation matrix.

The above properties are equivalent to |𝐮^|=|𝐯^|=|𝐰^|=1𝐮^⋅𝐯^=0𝐮^×𝐯^=𝐰^, which is another way of stating that (û, v̂, ŵ) form a 3D orthonormal basis. These statements comprise a total of 6 conditions (the cross product contains 3), leaving the rotation matrix with just 3 degrees of freedom, as required.

Two successive rotations represented by matrices A1 and A2 are easily combined as elements of a group, 𝐀total=𝐀2𝐀1 (Note the order, since the vector being rotated is multiplied from the right).

The ease by which vectors can be rotated using a rotation matrix, as well as the ease of combining successive rotations, make the rotation matrix a useful and popular way to represent rotations, even though it is less concise than other representations.

### Euler axis and angle (rotation vector)

A visualization of a rotation represented by an Euler axis and angle.

From Euler's rotation theorem we know that any rotation can be expressed as a single rotation about some axis. The axis is the unit vector (unique except for sign) which remains unchanged by the rotation. The magnitude of the angle is also unique, with its sign being determined by the sign of the rotation axis.

The axis can be represented as a three-dimensional unit vector 𝐞^=[exeyez] and the angle by a scalar θ.

Since the axis is normalized, it has only two degrees of freedom. The angle adds the third degree of freedom to this rotation representation.

One may wish to express rotation as a rotation vector, or Euler vector, an un-normalized three-dimensional vector the direction of which specifies the axis, and the length of which is θ, 𝐫=θ𝐞^.

The rotation vector is useful in some contexts, as it represents a three-dimensional rotation with only three scalar values (its components), representing the three degrees of freedom. This is also true for representations based on sequences of three Euler angles (see below).

If the rotation angle θ is zero, the axis is not uniquely defined. Combining two successive rotations, each represented by an Euler axis and angle, is not straightforward, and in fact does not satisfy the law of vector addition, which shows that finite rotations are not really vectors at all. It is best to employ the rotation matrix or quaternion notation, calculate the product, and then convert back to Euler axis and angle.

### Euler rotations

Euler rotations of the Earth. Intrinsic (green), precession (blue) and nutation (red)

The idea behind Euler rotations is to split the complete rotation of the coordinate system into three simpler constitutive rotations, called precession, nutation, and intrinsic rotation, being each one of them an increment on one of the Euler angles. Notice that the outer matrix will represent a rotation around one of the axes of the reference frame, and the inner matrix represents a rotation around one of the moving frame axes. The middle matrix represents a rotation around an intermediate axis called line of nodes.

However, the definition of Euler angles is not unique and in the literature many different conventions are used. These conventions depend on the axes about which the rotations are carried out, and their sequence (since rotations on a sphere are non-commutative).

The convention being used is usually indicated by specifying the axes about which the consecutive rotations (before being composed) take place, referring to them by index (1, 2, 3) or letter (X, Y, Z). The engineering and robotics communities typically use 3-1-3 Euler angles. Notice that after composing the independent rotations, they do not rotate about their axis anymore. The most external matrix rotates the other two, leaving the second rotation matrix over the line of nodes, and the third one in a frame comoving with the body. There are 3 × 3 × 3 = 27 possible combinations of three basic rotations but only 3 × 2 × 2 = 12 of them can be used for representing arbitrary 3D rotations as Euler angles. These 12 combinations avoid consecutive rotations around the same axis (such as XXY) which would reduce the degrees of freedom that can be represented.

Therefore, Euler angles are never expressed in terms of the external frame, or in terms of the co-moving rotated body frame, but in a mixture. Other conventions (e.g., rotation matrix or quaternions) are used to avoid this problem.

In aviation orientation of the aircraft is usually expressed as intrinsic Tait-Bryan angles following the z-y′-x″ convention, which are called heading, elevation, and bank (or synonymously, yaw, pitch, and roll).

### Quaternions

Quaternions, which form a four-dimensional vector space, have proven very useful in representing rotations due to several advantages over the other representations mentioned in this article.

A quaternion representation of rotation is written as a versor (normalized quaternion): 𝐪^=qi𝐢+qj𝐣+qk𝐤+qr=[qiqjqkqr]

The above definition stores the quaternion as an array following the convention used in (Wertz 1980) and (Markley 2003). An alternative definition, used for example in (Coutsias 1999) and (Schmidt 2001), defines the "scalar" term as the first quaternion element, with the other elements shifted down one position.

In terms of the Euler axis 𝐞^=[exeyez]

and angle θ this versor's components are expressed as follows: qi=exsin⁡θ2qj=eysin⁡θ2qk=ezsin⁡θ2qr=cos⁡θ2

Inspection shows that the quaternion parametrization obeys the following constraint: qi2+qj2+qk2+qr2=1

The last term (in our definition) is often called the scalar term, which has its origin in quaternions when understood as the mathematical extension of the complex numbers, written as a+bi+cj+dkwith a,b,c,d∈ℝ and where {i, j, k} are the hypercomplex numbers satisfying i2=j2=k2=−1ij=−ji=kjk=−kj=iki=−ik=j

Quaternion multiplication, which is used to specify a composite rotation, is performed in the same manner as multiplication of complex numbers, except that the order of the elements must be taken into account, since multiplication is not commutative. In matrix notation we can write quaternion multiplication as 𝐪~⊗𝐪=[qrqk−qjqi−qkqrqiqjqj−qiqrqk−qi−qj−qkqr][q~iq~jq~kq~r]=[q~r−q~kq~jq~iq~kq~r−q~iq~j−q~jq~iq~rq~k−q~i−q~j−q~kq~r][qiqjqkqr]

Combining two consecutive quaternion rotations is therefore just as simple as using the rotation matrix. Just as two successive rotation matrices, A1 followed by A2, are combined as 𝐀3=𝐀2𝐀1, we can represent this with quaternion parameters in a similarly concise way: 𝐪3=𝐪2⊗𝐪1

Quaternions are a very popular parametrization due to the following properties:

* More compact than the matrix representation and less susceptible to round-off errors
* The quaternion elements vary continuously over the unit sphere in ℝ4, (denoted by S3) as the orientation changes, avoiding discontinuous jumps (inherent to three-dimensional parameterizations)
* Expression of the rotation matrix in terms of quaternion parameters involves no trigonometric functions
* It is simple to combine two individual rotations represented as quaternions using a quaternion product

Like rotation matrices, quaternions must sometimes be renormalized due to rounding errors, to make sure that they correspond to valid rotations. The computational cost of renormalizing a quaternion, however, is much less than for normalizing a 3 × 3 matrix.

Quaternions also capture the spinorial character of rotations in three dimensions. For a three-dimensional object connected to its (fixed) surroundings by slack strings or bands, the strings or bands can be untangled after two complete turns about some fixed axis from an initial untangled state. Algebraically, the quaternion describing such a rotation changes from a scalar +1 (initially), through (scalar + pseudovector) values to scalar −1 (at one full turn), through (scalar + pseudovector) values back to scalar +1 (at two full turns). This cycle repeats every 2 turns. After 2n turns (integer n > 0), without any intermediate untangling attempts, the strings/bands can be partially untangled back to the 2(n − 1) turns state with each application of the same procedure used in untangling from 2 turns to 0 turns. Applying the same procedure n times will take a 2n-tangled object back to the untangled or 0 turn state. The untangling process also removes any rotation-generated twisting about the strings/bands themselves. Simple 3D mechanical models can be used to demonstrate these facts.

### Rodrigues vector

The Rodrigues vector (sometimes called the Gibbs vector, with coordinates called Rodrigues parameters)[3][4] can be expressed in terms of the axis and angle of the rotation as follows: 𝐠=𝐞^tan⁡θ2

This representation is a higher-dimensional analog of the gnomonic projection, mapping unit quaternions from a 3-sphere onto the 3-dimensional pure-vector hyperplane.

It has a discontinuity at 180° (π radians): as any rotation vector r tends to an angle of π radians, its tangent tends to infinity.

A rotation g followed by a rotation f in the Rodrigues representation has the simple rotation composition form

(𝐠,𝐟)=𝐠+𝐟−𝐟×𝐠1−𝐠⋅𝐟.

Today, the most straightforward way to prove this formula is in the (faithful) doublet representation, where g = n̂ tan a, etc.

The combinatoric features of the Pauli matrix derivation just mentioned are also identical to the equivalent quaternion derivation below. Construct a quaternion associated with a spatial rotation R as, S=cos⁡ϕ2+sin⁡ϕ2𝐒. Then the composition of the rotation RB with RA is the rotation RC = RBRA, with rotation axis and angle defined by the product of the quaternions, A=cos⁡α2+sin⁡α2𝐀andB=cos⁡β2+sin⁡β2𝐁, that is C=cos⁡γ2+sin⁡γ2𝐂=(cos⁡β2+sin⁡β2𝐁)(cos⁡α2+sin⁡α2𝐀).

Expand this quaternion product to cos⁡γ2+sin⁡γ2𝐂=(cos⁡β2cos⁡α2−sin⁡β2sin⁡α2𝐁⋅𝐀)+(sin⁡β2cos⁡α2𝐁+sin⁡α2cos⁡β2𝐀+sin⁡β2sin⁡α2𝐁×𝐀).

Divide both sides of this equation by the identity resulting from the previous one, cos⁡γ2=cos⁡β2cos⁡α2−sin⁡β2sin⁡α2𝐁⋅𝐀, and evaluate

tan⁡γ2𝐂=tan⁡β2𝐁+tan⁡α2𝐀+tan⁡β2tan⁡α2𝐁×𝐀1−tan⁡β2tan⁡α2𝐁⋅𝐀.

This is Rodrigues' formula for the axis of a composite rotation defined in terms of the axes of the two component rotations. He derived this formula in 1840 (see page 408).[3] The three rotation axes A, B, and C form a spherical triangle and the dihedral angles between the planes formed by the sides of this triangle are defined by the rotation angles.

Modified Rodrigues parameters (MRPs) can be expressed in terms of Euler axis and angle by 𝐩=𝐞^tan⁡θ4. Its components can be expressed in terms of the components of a unit quaternion representing the same rotation as px,y,z=qi,j,k1+qr.

The modified Rodrigues vector is a stereographic projection mapping unit quaternions from a 3-sphere onto the 3-dimensional pure-vector hyperplane. The projection of the opposite quaternion −q results in a different modified Rodrigues vector ps than the projection of the original quaternion q. Comparing components one obtains that px,y,zs=−qi,j,k1−qr=−px,y,z𝐩2. Notably, if one of these vectors lies inside the unit 3-sphere, the other will lie outside.

### Cayley–Klein parameters

See definition at Wolfram Mathworld.

### Higher-dimensional analogues

### Vector transformation law

Active rotations of a 3D vector p in Euclidean space around an axis n over an angle η can be easily written in terms of dot and cross products as follows:

𝐩′=p∥𝐧+cos⁡η𝐩⊥+sin⁡η𝐩∧𝐧 wherein p∥=𝐩⋅𝐧 is the longitudinal component of p along n, given by the dot product, 𝐩⊥=𝐩−(𝐩⋅𝐧)𝐧 is the transverse component of p with respect to n, and 𝐩∧𝐧

is the cross product of p with n.

The above formula shows that the longitudinal component of p remains unchanged, whereas the transverse portion of p is rotated in the plane perpendicular to n. This plane is spanned by the transverse portion of p itself and a direction perpendicular to both p and n. The rotation is directly identifiable in the equation as a 2D rotation over an angle η.

Passive rotations can be described by the same formula, but with an inverse sign of either η or n.

## Conversion formulae between formalisms

### Rotation matrix ↔ Euler angles

The Euler angles (φ, θ, ψ) can be extracted from the rotation matrix A by inspecting the rotation matrix in analytical form.

#### Rotation matrix → Euler angles (z-x-z extrinsic)

Using the x-convention, the 3-1-3 extrinsic Euler angles φ, θ and ψ (around the z-axis, x-axis and again the Z-axis) can be obtained as follows: ϕ=atan2⁡(A31,A32)θ=arccos⁡(A33)ψ=−atan2⁡(A13,A23)

Note that atan2(a, b) is equivalent to arctan ⁠a/b⁠ where it also takes into account the quadrant that the point (b, a) is in; see atan2.

When implementing the conversion, one has to take into account several situations:[5]

* There are generally two solutions in the interval [−π, π]3. The above formula works only when θ is within the interval [0, π].
* For the special case A33 = 0, φ and ψ will be derived from A11 and A12.
* There are infinitely many but countably many solutions outside of the interval [−π, π]3.
* Whether all mathematical solutions apply for a given application depends on the situation.

#### Euler angles (z-y′-x″ intrinsic) → rotation matrix

The rotation matrix A is generated from the 3-2-1 intrinsic Euler angles by multiplying the three matrices generated by rotations about the axes. 𝐀=𝐀3𝐀2𝐀1=𝐀Z𝐀Y𝐀X

The axes of the rotation depend on the specific convention being used. For the x-convention the rotations are about the x-, y\- and z-axes with angles ϕ, θ and ψ, the individual matrices are as follows: 𝐀X=[1000cos⁡ϕ−sin⁡ϕ0sin⁡ϕcos⁡ϕ][5px]𝐀Y=[cos⁡θ0sin⁡θ010−sin⁡θ0cos⁡θ][5px]𝐀Z=[cos⁡ψ−sin⁡ψ0sin⁡ψcos⁡ψ0001]

This yields 𝐀=[cos⁡θcos⁡ψ−cos⁡ϕsin⁡ψ+sin⁡ϕsin⁡θcos⁡ψsin⁡ϕsin⁡ψ+cos⁡ϕsin⁡θcos⁡ψcos⁡θsin⁡ψcos⁡ϕcos⁡ψ+sin⁡ϕsin⁡θsin⁡ψ−sin⁡ϕcos⁡ψ+cos⁡ϕsin⁡θsin⁡ψ−sin⁡θsin⁡ϕcos⁡θcos⁡ϕcos⁡θ] Note: This is valid for a right-hand system, which is the convention used in almost all engineering and physics disciplines.

The interpretation of these right-handed rotation matrices is that they express coordinate transformations (passive) as opposed to point transformations (active). Because A expresses a rotation from the local frame 1 to the global frame 0 (i.e., A encodes the axes of frame 1 with respect to frame 0), the elementary rotation matrices are composed as above. Because the inverse rotation is just the rotation transposed, if we wanted the global-to-local rotation from frame 0 to frame 1, we would write 𝐀T=(𝐀Z𝐀Y𝐀X)T=𝐀XT𝐀YT𝐀ZT.

### Rotation matrix ↔ Euler axis/angle

If the Euler angle θ is not a multiple of π, the Euler axis ê and angle θ can be computed from the elements of the rotation matrix A as follows: θ=arccos⁡A11+A22+A33−12e1=A32−A232sin⁡θe2=A13−A312sin⁡θe3=A21−A122sin⁡θ

Alternatively, the following method can be used:

Eigendecomposition of the rotation matrix yields the eigenvalues 1 and cos θ ± i sin θ. The Euler axis is the eigenvector corresponding to the eigenvalue of 1, and θ can be computed from the remaining eigenvalues.

The Euler axis can be also found using singular value decomposition since it is the normalized vector spanning the null-space of the matrix I − A.

To convert the other way the rotation matrix corresponding to an Euler axis ê and angle θ can be computed according to Rodrigues' rotation formula (with appropriate modification) as follows: 𝐀=𝐈3cos⁡θ+(1−cos⁡θ)𝐞^𝐞^T+[𝐞^]×sin⁡θ

with I3 the 3 × 3 identity matrix, and [𝐞^]×=[0−e3e2e30−e1−e2e10]

is the cross-product matrix.

This expands to: A11=(1−cos⁡θ)e12+cos⁡θA12=(1−cos⁡θ)e1e2−e3sin⁡θA13=(1−cos⁡θ)e1e3+e2sin⁡θA21=(1−cos⁡θ)e2e1+e3sin⁡θA22=(1−cos⁡θ)e22+cos⁡θA23=(1−cos⁡θ)e2e3−e1sin⁡θA31=(1−cos⁡θ)e3e1−e2sin⁡θA32=(1−cos⁡θ)e3e2+e1sin⁡θA33=(1−cos⁡θ)e32+cos⁡θ

### Rotation matrix ↔ quaternion

When computing a quaternion from the rotation matrix there is a sign ambiguity, since q and −q represent the same rotation.

One way of computing the quaternion 𝐪=[qiqjqkqr]=qi𝐢+qj𝐣+qk𝐤+qr from the rotation matrix A is as follows: qr=121+A11+A22+A33qi=14qr(A32−A23)qj=14qr(A13−A31)qk=14qr(A21−A12)

There are three other mathematically equivalent ways to compute q. Numerical inaccuracy can be reduced by avoiding situations in which the denominator is close to zero. One of the other three methods looks as follows:[6][7] qi=121+A11−A22−A33qj=14qi(A12+A21)qk=14qi(A13+A31)qr=14qi(A32−A23)

The rotation matrix corresponding to the quaternion q can be computed as follows: 𝐀=(qr2−𝐪ˇT𝐪ˇ)𝐈3+2𝐪ˇ𝐪ˇT+2qr𝒬 where 𝐪ˇ=[qiqjqk],𝒬=[0−qkqjqk0−qi−qjqi0] which gives 𝐀=[1−2qj2−2qk22(qiqj−qkqr)2(qiqk+qjqr)2(qiqj+qkqr)1−2qi2−2qk22(qjqk−qiqr)2(qiqk−qjqr)2(qjqk+qiqr)1−2qi2−2qj2]

or equivalently 𝐀=[−1+2qi2+2qr22(qiqj−qkqr)2(qiqk+qjqr)2(qiqj+qkqr)−1+2qj2+2qr22(qjqk−qiqr)2(qiqk−qjqr)2(qjqk+qiqr)−1+2qk2+2qr2]

### Euler angles ↔ quaternion

#### Euler angles (z-x-z extrinsic) → quaternion

We will consider the x-convention 3-1-3 extrinsic Euler angles for the following algorithm. The terms of the algorithm depend on the convention used.

We can compute the quaternion 𝐪=[qiqjqkqr]=qi𝐢+qj𝐣+qk𝐤+qr from the Euler angles (ϕ, θ, ψ) as follows:

qi=cos⁡ϕ−ψ2sin⁡θ2qj=sin⁡ϕ−ψ2sin⁡θ2qk=sin⁡ϕ+ψ2cos⁡θ2qr=cos⁡ϕ+ψ2cos⁡θ2

#### Euler angles (z-y′-x″ intrinsic) → quaternion

A quaternion equivalent to yaw (ψ), pitch (θ) and roll (ϕ) angles. or intrinsic Tait–Bryan angles following the z-y′-x″ convention, can be computed by

qi=sin⁡ϕ2cos⁡θ2cos⁡ψ2−cos⁡ϕ2sin⁡θ2sin⁡ψ2qj=cos⁡ϕ2sin⁡θ2cos⁡ψ2+sin⁡ϕ2cos⁡θ2sin⁡ψ2qk=cos⁡ϕ2cos⁡θ2sin⁡ψ2−sin⁡ϕ2sin⁡θ2cos⁡ψ2qr=cos⁡ϕ2cos⁡θ2cos⁡ψ2+sin⁡ϕ2sin⁡θ2sin⁡ψ2

#### Quaternion → Euler angles (z-x-z extrinsic)

Given the rotation quaternion 𝐪=[qiqjqkqr]=qi𝐢+qj𝐣+qk𝐤+qr, the x-convention 3-1-3 extrinsic Euler Angles (φ, θ, ψ) can be computed by

ϕ=atan2⁡((qiqk+qjqr),−(qjqk−qiqr))θ=arccos⁡(−qi2−qj2+qk2+qr2)ψ=atan2⁡((qiqk−qjqr),(qjqk+qiqr))

#### Quaternion → Euler angles (z-y′-x″ intrinsic)

Given the rotation quaternion 𝐪=[qiqjqkqr]=qi𝐢+qj𝐣+qk𝐤+qr, yaw, pitch and roll angles, or intrinsic Tait–Bryan angles following the z-y′-x″ convention, can be computed by

roll=atan2⁡(2(qrqi+qjqk),1−2(qi2+qj2))pitch=arcsin⁡(2(qrqj−qkqi))yaw=atan2⁡(2(qrqk+qiqj),1−2(qj2+qk2))

### Euler axis–angle ↔ quaternion

Given the Euler axis ê and angle θ, the quaternion 𝐪=[qiqjqkqr]=qi𝐢+qj𝐣+qk𝐤+qr,

can be computed by qi=e^1sin⁡θ2qj=e^2sin⁡θ2qk=e^3sin⁡θ2qr=cos⁡θ2

Given the rotation quaternion q, define 𝐪ˇ=[qiqjqk]. Then the Euler axis ê and angle θ can be computed by 𝐞^=𝐪ˇ‖𝐪ˇ‖θ=2arccos⁡qr

### Rotation matrix ↔ Rodrigues vector

#### Rodrigues vector → Rotation matrix

Since the definition of the Rodrigues vector can be related to rotation quaternions:{gi=qiqr=extan⁡(θ2)gj=qjqr=eytan⁡(θ2)gk=qkqr=eztan⁡(θ2)By making use of the following property1=qr2+qi2+qj2+qk2=qr2(1+qi2qr2+qj2qr2+qk2qr2)=qr2(1+gi2+gj2+gk2)The formula can be obtained by factoring q2r from the final expression obtained for quaternions:

𝐀=qr2[1qr2−2qj2qr2−2qk2qr22(qiqrqjqr−qkqr)2(qiqrqkqr+qjqr)2(qiqrqjqr+qkqr)1qr2−2qi2qr2−2qk2qr22(qjqrqkqr−qiqr)2(qiqrqkqr−qjqr)2(qjqrqkqr+qiqr)1qr2−2qi2qr2−2qj2qr2]

Leading to the final formula:

𝐀=11+gi2+gj2+gk2[1+gi2−gj2−gk22(gigj−gk)2(gigk+gj)2(gigj+gk)1−gi2+gj2−gk22(gjgk−gi)2(gigk−gj)2(gjgk+gi)1−gi2−gj2+gk2]

## Conversion formulae for derivatives

### Rotation matrix ↔ angular velocities

The angular velocity vector ω=[ωxωyωz] can be extracted from the time derivative of the rotation matrix ⁠dA/dt⁠ by the following relation: [ω]×=[0−ωzωyωz0−ωx−ωyωx0]=d𝐀dt𝐀T

The derivation is adapted from Ioffe[8] as follows:

For any vector r0, consider r(t) = A(t)r0 and differentiate it: d𝐫dt=d𝐀dt𝐫0=d𝐀dt𝐀T(t)r(t)

The derivative of a vector is the linear velocity of its tip. Since A is a rotation matrix, by definition the length of r(t) is always equal to the length of r0, and hence it does not change with time. Thus, when r(t) rotates, its tip moves along a circle, and the linear velocity of its tip is tangential to the circle; i.e., always perpendicular to r(t). In this specific case, the relationship between the linear velocity vector and the angular velocity vector is d𝐫dt=ω(t)×𝐫(t)=[ω]×𝐫(t) (see circular motion and cross product).

By the transitivity of the abovementioned equations, d𝐀dt𝐀T(t)𝐫(t)=[ω]×𝐫(t)

which implies d𝐀dt𝐀T(t)=[ω]×

### Quaternion ↔ angular velocities

The angular velocity vector ω=[ωxωyωz] can be obtained from the derivative of the quaternion ⁠dq/dt⁠ as follows:[9] [0ωxωyωz]=2d𝐪dt𝐪~ where q̃ is the conjugate (inverse) of q.

Conversely, the derivative of the quaternion is d𝐪dt=12[0ωxωyωz]𝐪.

## Rotors in a geometric algebra

The formalism of geometric algebra (GA) provides an extension and interpretation of the quaternion method. Central to GA is the geometric product of vectors, an extension of the traditional inner and cross products, given by 𝐚𝐛=𝐚⋅𝐛+𝐚∧𝐛

where the symbol ∧ denotes the exterior product or wedge product. This product of vectors a, and b produces two terms: a scalar part from the inner product and a bivector part from the wedge product. This bivector describes the plane perpendicular to what the cross product of the vectors would return.

Bivectors in GA have some unusual properties compared to vectors. Under the geometric product, bivectors have a negative square: the bivector x̂ŷ describes the xy-plane. Its square is (x̂ŷ)2 = x̂ŷx̂ŷ. Because the unit basis vectors are orthogonal to each other, the geometric product reduces to the antisymmetric outer product – x̂ and ŷ can be swapped freely at the cost of a factor of −1. The square reduces to −x̂x̂ŷŷ = −1 since the basis vectors themselves square to +1.

This result holds generally for all bivectors, and as a result the bivector plays a role similar to the imaginary unit. Geometric algebra uses bivectors in its analogue to the quaternion, the rotor, given by 𝐑=exp⁡(−𝐁^θ2)=cos⁡θ2−𝐁^sin⁡θ2, where B̂ is a unit bivector that describes the plane of rotation. Because B̂ squares to −1, the power series expansion of R generates the trigonometric functions. The rotation formula that maps a vector a to a rotated vector b is then 𝐛=𝐑𝐚𝐑† where 𝐑†=exp⁡(12𝐁^θ)=cos⁡θ2+𝐁^sin⁡θ2 is the reverse of R (reversing the order of the vectors in B is equivalent to changing its sign).

Example. A rotation about the axis 𝐯^=13(𝐱^+𝐲^+𝐳^) can be accomplished by converting v̂ to its dual bivector, 𝐁^=𝐱^𝐲^𝐳^𝐯^=𝐢𝐯^, where i = x̂ŷẑ is the unit volume element, the only trivector (pseudoscalar) in three-dimensional space. The result is 𝐁^=13(𝐲^𝐳^+𝐳^𝐱^+𝐱^𝐲^).

In three-dimensional space, however, it is often simpler to leave the expression for B̂ = iv̂, using the fact that i commutes with all objects in 3D and also squares to −1. A rotation of the x̂ vector in this plane by an angle θ is then

𝐱^′=𝐑𝐱^𝐑†=e−i𝐯^θ2𝐱^ei𝐯^θ2=𝐱^cos2θ2+𝐢(𝐱^𝐯^−𝐯^𝐱^)cos⁡θ2sin⁡θ2+𝐯^𝐱^𝐯^sin2θ2

Recognizing that 𝐢(𝐱^𝐯^−𝐯^𝐱^)=2𝐢(𝐱^∧𝐯^) and that −v̂x̂v̂ is the reflection of x̂ about the plane perpendicular to v̂ gives a geometric interpretation to the rotation operation: the rotation preserves the components that are parallel to v̂ and changes only those that are perpendicular. The terms are then computed: 𝐯^𝐱^𝐯^=13(−𝐱^+2𝐲^+2𝐳^)2𝐢𝐱^∧𝐯^=2𝐢13(𝐱^𝐲^+𝐱^𝐳^)=23(𝐲^−𝐳^)

The result of the rotation is then 𝐱^′=𝐱^(cos2θ2−13sin2θ2)+23𝐲^sin⁡θ2(sin⁡θ2+3cos⁡θ2)+23𝐳^sin⁡θ2(sin⁡θ2−3cos⁡θ2)

A simple check on this result is the angle θ = ⁠2/3⁠π. Such a rotation should map x̂ to ŷ. Indeed, the rotation reduces to 𝐱^′=𝐱^(14−1334)+23𝐲^32(32+312)+23𝐳^32(32−312)=0𝐱^+𝐲^+0𝐳^=𝐲^

exactly as expected. This rotation formula is valid not only for vectors but for any multivector. In addition, when Euler angles are used, the complexity of the operation is much reduced. Compounded rotations come from multiplying the rotors, so the total rotor from Euler angles is 𝐑=𝐑γ′𝐑β′𝐑α=exp⁡(−𝐢𝐳^′γ2)exp⁡(−𝐢𝐱^′β2)exp⁡(−𝐢𝐳^α2) but 𝐱^′=𝐑α𝐱^𝐑α†and𝐳^′=𝐑β′𝐳^𝐑β′†. These rotors come back out of the exponentials like so: 𝐑β′=cos⁡β2−𝐢𝐑α𝐱^𝐑α†sin⁡β2=𝐑α𝐑β𝐑α† where Rβ refers to rotation in the original coordinates. Similarly for the γ rotation, 𝐑γ′=𝐑β′𝐑γ𝐑β′†=𝐑α𝐑β𝐑α†𝐑γ𝐑α𝐑β†𝐑α†. Noting that Rγ and Rα commute (rotations in the same plane must commute), and the total rotor becomes 𝐑=𝐑α𝐑β𝐑γ

Thus, the compounded rotations of Euler angles become a series of equivalent rotations in the original fixed frame.

While rotors in geometric algebra work almost identically to quaternions in three dimensions, the power of this formalism is its generality: this method is appropriate and valid in spaces with any number of dimensions. In 3D, rotations have three degrees of freedom, a degree for each linearly independent plane (bivector) the rotation can take place in. It has been known that pairs of quaternions can be used to generate rotations in 4D, yielding six degrees of freedom, and the geometric algebra approach verifies this result: in 4D, there are six linearly independent bivectors that can be used as the generators of rotations.

## Angle-angle-angle

Rotations can be modeled as an axis and an angle; as illustrated with a gyroscope which has an axis through the rotor, and the amount of spin around that axis demonstrated by the rotation of the rotor; this rotation can be expressed as angle ∗ (axis) where axis is a unit vector specifying the direction of the rotor axis. From the origin, in any direction, is the same rotation axis, with the scale of the angle equivalent to the distance from the origin. From any other point in space, similarly the same direction vector applied relative to the orientation represented by the starting point rather than the origin applies the same change around the same axes that the unit vector specifies. The angle ∗ axis scaling each point gives a unique coordinate in angle-angle-angle notation. The difference between two coordinates immediately yields the single axis of rotation and angle between the two orientations.

The natural log of a quaternion represents curving space by 3 angles around 3 axles of rotation, and is expressed in arc-length; similar to Euler angles, but order independent.[10] There is a Lie product formula definition of the addition of rotations, which is that they are sum of infinitesimal steps of each rotation applied in series; this would imply that rotations are the result of all rotations in the same instant are applied, rather than a series of rotations applied subsequently.

The axes of rotation are aligned to the standard Cartesian x, y, z axes. These rotations may be simply added and subtracted, especially when the frames being rotated are fixed to each other as in IK chains. Differences between two objects that are in the same reference frame are found by simply subtracting their orientations. Rotations that are applied from external sources, or are from sources relative to the current rotation still require multiplications, application of the Rodriguez Formula is provided.

The rotation from each axle coordinate represent rotating the plane perpendicular to the specified axis simultaneously with all other axles. Although the measures can be considered in angles, the representation is actually the arc-length of the curve; an angle implies a rotation around a point, where a curvature is a delta applied to the current point in an inertial direction.

Just an observational note: log quaternions have rings, or octaves of rotations; that is for rotations greater than 4π have related curves. Curvatures of things that approach this boundary appear to chaotically jump orbits.

For 'human readable' angles the 1-norm can be used to rescale the angles to look more 'appropriate':

𝐐=[XYZ] Other related values are immediately derivable: ‖𝐕‖ or ‖𝐕‖2=XX+YY+ZZ‖𝐕‖1=|X|+|Y|+|Z| The total angle of rotation: θ=‖𝐕‖ The axis of rotation: Axis(ln⁡𝐐)=[XθYθZθ]

### Quaternion representation

𝐪=[cos⁡θ2sin⁡θ2X‖𝐐‖sin⁡θ2Y‖𝐐‖sin⁡θ2Z‖𝐐‖]

### Basis matrix computation

This was built from rotating the vectors (1,0,0), (0,1,0), (0,0,1), and reducing constants.

Given an input Q = [X, Y, Z], qr=cos⁡θqi=sin⁡θ⋅X‖𝐐‖qj=sin⁡θ⋅Y‖𝐐‖qk=sin⁡θ⋅Z‖𝐐‖

Which are used to compute the resulting matrix [1−2qj2−2qk22(qiqj−qkqr)2(qiqk+qjqr)2(qiqj+qkqr)1−2qi2−2qk22(qjqk−qiqr)2(qiqk−qjqr)2(qjqk+qiqr)1−2qi2−2qj2]

### Alternate basis calculation

Alternatively this can be used. Given A = [X, Y, Z], convert to angle-axis θ = ||A||, and [x, y, z] = ⁠A/||A||⁠.

Compute some partial expressions:xy=xy(1−cos⁡θ)wx=xsin⁡θxx=xx(1−cos⁡θ)yz=yz(1−cos⁡θ)wy=ysin⁡θyy=yy(1−cos⁡θ)xz=xz(1−cos⁡θ)wz=zsin⁡θzz=zz(1−cos⁡θ)

Compute the resulting matrix: [cos⁡θ+xxxy+wzwy+xzwz+xycos⁡θ+yyyz−wxxz−wywx+yzcos⁡θ+zz]

Expanded: [cos⁡θ+x2(1−cos⁡θ)xy(1−cos⁡θ)−zsin⁡θysin⁡θ+xz(1−cos⁡θ)zsin⁡θ+xy(1−cos⁡θ)cos⁡θ+y2(1−cos⁡θ)yz(1−cos⁡θ)−xsin⁡θxz(1−cos⁡θ)−ysin⁡θxsin⁡θ+yz(1−cos⁡θ)cos⁡θ+z2(1−cos⁡θ)]

### Vector rotation

Rotate the vector v = (X, Y, Z) around the rotation vector Q = (X, Y, Z).

The angle of rotation will be θ = ||Q||.

Calculate the cosine of the angle times the vector to rotate, plus sine of the angle times the axis of rotation, plus one minus cosine of the angle times the dot product of the vector and rotation axis times the axis of rotation. 𝐯′=cos⁡(θ)𝐯+sin⁡(θ)(𝐐‖𝐐‖×𝐯)+(1−cos⁡(θ))(𝐐‖𝐐‖⋅𝐯)𝐐‖𝐐‖

Some notes: the dot product includes the cosine of the angle between the vector being rotated and the axis of rotation times the length of v; the cross product includes the sine of the angle between the vector being rotated and the axis of rotation.

### Rotate a rotation vector

Using Rodrigues' composite rotation formula, for a given rotation vector Q = (X, Y, Z), and another rotation vector A = (X′, Y′, Z′) to rotate the frame around.

From the initial rotation vectors, extract the angles and axes: θ=‖𝐐‖2γ=‖𝐀‖2 Normalized axis of rotation for the current frame: 𝐐^=𝐐‖𝐐‖ Normalized axis of rotation to rotate the frame around: 𝐀^=𝐀‖𝐀‖

The result angle angle of the rotation is α=2arccos⁡(cos⁡(θ)cos⁡(γ)+sin⁡(θ)sin⁡(γ)𝐐^⋅𝐀^) or α=2arccos⁡(cos⁡(θ−γ)(1−𝐐^⋅𝐀^)+cos⁡(θ+γ)(1+𝐐^⋅𝐀^))

The resultant, unnormalized axis of rotation: 𝐫=sin⁡γcos⁡θ𝐀^+sin⁡θcos⁡γ𝐐^+sin⁡θsin⁡γ𝐀^×𝐐^ or r=(𝐀^×𝐐^)(cos⁡(θ−γ)−cos⁡(θ+γ))+𝐀^(sin⁡(θ+γ)+sin⁡(θ−γ))+𝐐^(sin⁡(θ+γ)−sin⁡(θ−γ))

The Rodrigues rotation formula would lead that the sin of above resulting angle can be used to normalize the vector, however this fails for large ranges; so normalize the result axis as any other vector. 𝐑^=𝐫‖𝐫‖

And the final frame rotation coordinate: 𝐑=α𝐑^

### Spin rotation around a fixed axis

A rotation vector Q represents three axes; these may be used as a shorthand to rotate the rotation around using the above method to rotate a rotation vector. These expressions are best represented as code fragments.

Setup some constants used in other expressions. nx=Qx‖𝐐‖ny=Qy‖𝐐‖nz=Qz‖𝐐‖angle=‖𝐐‖s=sin⁡(angle)c1=cos⁡(angle)c=1−c1 using the above values: x-axis=[x=cnx2+c1,y=cnxny+snz,z=cnxnz−sny] or y-axis=[x=cnynx−snz,y=cny2+c1,z=cnynz+snx] or z-axis=[x=cnznx+sny,y=cnzny−snx,z=cnz2+c1]

### Conversion from Basis Matrix

Compute the determinant of the matrix: d=(basisrightX+basisupY+basisforwardZ)−12 Convert to the angle of rotation: θ=2arccos⁡dyz=basisupZ−basisforwardYxz=basisforwardX−basisrightZxy=basisrightY−basisupX Compute the normal factor: normal=1yz2+xz2+xy2𝐧=[yz⋅normalxz⋅normalxy⋅normal]

the resulting angle-angle-angle is n ⋅ θ.

### Conversion from normal vector (Y)

Representation of a normal as a rotation, this assumes that the Y axis vector (0,1,0) is pointing up. If some other axis is considered primary, the coordinates can be simply swapped.

This assumes a normalized input vector in the direction of the normal 𝐍=[normalXnormalYnormalZ] The angle is simply the sum of the x\- and z-coordinates (or y and x if Z is up, or y and z if X is up): angle=|Nx|+|Nz| if angle is 0, the job is done, result with (0,0,0) r=1angle Some temporary values; these values are just partials referenced later: 𝐭=[Nx⋅rNyNz⋅r] Use the projected normal on the Y axis as the angle to rotate: targetangle=arccos⁡tYresult=[tZ⋅targetangle0−tX⋅targetangle]

#### Align normal using basis

The default tangent and bitangent of rotations which only have their normal set, results in tangents and bi-tangents that are irregular. Alternatively build a basis matrix, and convert from basis using the above mentioned method. Compute the normal of the above, and the matrix to convert normaltwist=tZ2+tX2 [(Ny⋅−tXnormaltwist)NxtZnormaltwist(Nz⋅tZnormaltwist)−(Nx⋅−tXnormaltwist)Ny0(−Ny⋅tZnormaltwist)Nz−tXnormaltwist] and then use the basis to log quaternion conversion as follows.

#### Align normal directly

Or This is the direct computation to result with a log quaternion; compute the above result vector and then... tXn=tX⋅normaltwisttZn=tZ⋅normaltwists=sin⁡(targetangle)c=1−cos⁡(targetangle) This is the angle angle=arccos⁡((tY+1)(1−tXn)2−1); These partial products are used below: yz=s⋅nXxz=(2−c⋅(nX2+nZ2))⋅tZnxy=s⋅nX⋅tZn+s⋅nZ⋅(1−tXn) Compute the normalized rotation vector (axle of rotation): n=[yzyz2+xz2+xy2xzyz2+xz2+xy2xyyz2+xz2+xy2]

and finally compute the resulting log quaternion. finalresult=angle⋅n

### Conversion from axis-angle

This assumes the input axis a = [X, Y, Z] is normalized. If there is zero rotation, result with (0,0,0) θ=angle;result=θ*𝐚

## See also

* Euler filter
* Orientation (geometry)
* Rotation around a fixed axis
* Three-dimensional rotation operator

## References

1. ↑ "Fiducial Marker Tracking for Augmented Reality".
2. ↑ Weisstein, Eric W.. "Rotation Matrix". http://mathworld.wolfram.com/RotationMatrix.html.
3. ↑ 3.0 3.1 Rodrigues, Olinde (1840). "Des lois géometriques qui regissent les déplacements d'un systéme solide dans l'espace, et de la variation des coordonnées provenant de ces déplacement considérées indépendant des causes qui peuvent les produire". J. Math. Pures Appl. 5: 380–440. online
4. ↑ cf. J Willard Gibbs (1884). Elements of Vector Analysis, New Haven, p. 67
5. ↑ Direct and inverse kinematics lecture notes, page 5
6. ↑ Mebius, Johan (2007). "Derivation of the Euler–Rodrigues formula for three-dimensional rotations from the general formula for four-dimensional rotations". arXiv:math/0701759.
7. ↑ Shuster, Malcolm D. (1993). "A Survey of Attitude Representations". Journal of the Astronautical Sciences 41 (4): 439–517. http://malcolmdshuster.com/Pub_1993h_J_Repsurv_scan.pdf.
8. ↑ [1] Physics - Mark Ioffe - W(t) in terms of matrices
9. ↑ Quaternions and Rotation lecture notes, p. 14-15
10. ↑ d3x0r. "STFRPhysics Repository". https://github.com/d3x0r/STFRPhysics.

## Further reading

* Shuster, M.D. (1993). "A Survey of Attitude Representations". Journal of the Astronautical Sciences 41 (4): 439–517. Bibcode: 1993JAnSc..41..439S. http://www.malcolmdshuster.com/Pub_1993h_J_Repsurv_scan.pdf.
* Taubin, G. (2011). "3D Rotations". IEEE Computer Graphics and Applications 31 (6): 84–89. doi:10.1109/MCG.2011.92. PMID 24808261. http://mesh.brown.edu/rotations.
* Coutsias, E.; Romero, L. (2004). "The Quaternions with an application to Rigid Body Dynamics". Sandia Technical Report (Sandia National Laboraties). SAND2004-0153. https://digitalrepository.unm.edu/math_fsp/4/.
* Markley, F. Landis (2003). "Attitude Error Representations for Kalman Filtering". Journal of Guidance, Control and Dynamics 26 (2): 311–7. doi:10.2514/2.5048. Bibcode: 2003JGCD...26..311M.
* Goldstein, H. (1980). Classical Mechanics (2nd ed.). Addison–Wesley. ISBN 0-201-02918-9.
* Wertz, James R. (1980). Spacecraft Attitude Determination and Control. D. Reidel. ISBN 90-277-1204-2.
* Schmidt, J.; Niemann, H. (2001). "Using Quaternions for Parametrizing 3-D Rotations in Unconstrained Nonlinear Optimization". Proceedings of the Vision Modeling and Visualization Conference 2001. pp. 399–406. ISBN 3898380289.
* Landau, L.; Lifshitz, E.M. (1976). Mechanics (3rd ed.). Pergamon Press. ISBN 0-08-021022-8. https://archive.org/details/mechanics00land.
* Klumpp, A.R. (December 1976). "Singularity-Free Extraction of a Quaternion from a Direction-Cosine Matrix". Journal of Spacecraft and Rockets 13 (12): 754–5. doi:10.2514/3.27947. Bibcode: 1976JSpRo..13..754K.
* Doran, C.; Lasenby, A. (2003). Geometric Algebra for Physicists. Cambridge University Press. ISBN 978-0-521-71595-9.
* Terzakis, G.; Lourakis, M.; Ait-Boudaoud, D. (2018). "Modified Rodrigues Parameters: An Efficient Representation of Orientation in 3D Vision and Graphics". Journal of Mathematical Imaging and Vision 60 (3): 422–442. doi:10.1007/s10851-017-0765-x. http://rdcu.be/wIBC.
* Rowenhorst, D.; Rollett, A.D.; Rohrer, G.S.; Groeber, M.; Jackson, M.; Konijnenberg, P.J.; De Graef, M. (2015). "Consistent representations of and conversions between 3D rotations". Modelling and Simulation in Materials Science and Engineering 23 (8): 083501. doi:10.1088/0965-0393/23/8/083501. Bibcode: 2015MSMSE..23h3501R.

## External links

* EuclideanSpace has a wealth of information on rotation representation
* Q36. How do I generate a rotation matrix from Euler angles? and Q37. How do I convert a rotation matrix to Euler angles? — The Matrix and Quaternions FAQ
* Imaginary numbers are not Real – the Geometric Algebra of Spacetime – Section "Rotations and Geometric Algebra" derives and applies the rotor description of rotations
* Starlino's DCM Tutorial – Direction cosine matrix theory tutorial and applications. Space orientation estimation algorithm using accelerometer, gyroscope and magnetometer IMU devices. Using complimentary filter (popular alternative to Kalman filter) with DCM matrix.

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Rotation_formalisms_in_three_dimensions&oldid=4380257"