September 8, 2024
Search
Search
Close this search box.

R3 – Complex Rotations – Example 1

Up to this point, we’ve focused on unitary rotations around a single axis on the unit sphere. Now, let’s delve into more complex rotations in R3, where the operand can be any combination of Opposite Values with any degree of rotation. This post introduces the Wave Number Rotation formula, based on Rodrigues’ formula for calculating rotation along with the first of 3 examples of complex rotation:

Rodrigues’ Formula

In terms of Tait-Bryan Intrinsic rotation, more complex rotations  are made up of z-y-x’’ rotation using the Tait-Bryan angles with any values of φ, θ and ψ.   However, using a 3-step process to calculate rotation can lead to Gimbal lock. This causes the loss of correct orientation.

A single axis-angle rotation around any vector through the origin overcomes Gimbal lock. Rodrigues’ rotation formula supports a single axis-angle rotation:

v_{rot} = cos\theta (v) + sin\theta(u_r \times v)+(1 - cos\theta)(u_r \cdot v)u_r

In this formula:

  • v is the vector being rotated.
  • u_r is the unit vector representing the axis of rotation.
  • \theta is the angle of rotation.

The “.” in the formula represents the dot product of two Opposite Values. The post on dot product explains this calculation. The “x”s in the in the formula represents the cross product of two Opposite Values. The post on cross product explains these calculations.

This approach allows for the calculation of rotations around any vector through the origin, effectively handling complex rotations in \mathbb{R}3 .

Rewrite the vrot formula as:

Wave Numbers uses this formula to calculate rotation in R3.

Checking the Results of Rotation in R3

All the examples of rotation are checked using the online calculator available on the top menu. They are also cross-checked against the equivalent vector rotations using the Quaternion Calculator which is one of the many calculators in the Omni Calculator. The equivalent Quaternion calculation follows each example.

Example 1

Take for example 60^o(4^+ 5i^ + 6j^) (1^ + 2i^ + 3j^). 

  • Here θ = 60^o and v  = (1^ + 2i^ + 3j^).
  • u_r is the unit of rotation for the Opposite Value (4^+ 5i^ + 6j^) that is the Opposite Value divided by its magnitude or radius. This gives a unit of rotation as follows:
    • (4^+ 5i^ + 6j^)/√(|4^|2 + |5i^ |2 + |6j^|2)
    • = (4^+ 5i^ + 6j^)/√(77)
    • = (4^+ 5i^ + 6j^)/8.77
    • = (.456^ +  .57i^ +  .684j^)

This leads to the following v_{rot} equation:

\begin{equation} v_{rot} = (\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \cdot \left[ \begin{array} {c} 1 \hat{ } \\ 2 i\hat{ } \\ 3j\hat{ } \end{array} \right]) \left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] + sin60^{\hat{ }o}(\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1 \hat{ } \\ 2 i\hat{ } \\ 3j\hat{ } \end{array} \right]) + cos60^{\hat{ }o}((\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1 \hat{ } \\ 2 i\hat{ } \\ 3j\hat{ } \end{array} \right]) \times \left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right]) \end{equation</em>}

\begin{equation} v_{rot} = 3.648\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] + 0.866(\left[ \begin{array} {c} 0.342 \hat{ } \\ 0.684 i^v \\ 0.342j\hat{ }  \end{array} \right]) + 0.5(\left[ \begin{array} {c} 0.342 \hat{ } \\ 0.684 i^v \\ 0.342j\hat{ }  \end{array} \right] \times  \left[ \begin{array} {c} 0.456 \hat{ } \\ 0.571 i\hat{ } \\ 0.684j\hat{ }  \end{array} \right])  \end{equation</em>}

\begin{equation} v_{rot} = \left[ \begin{array} {c} 1.662 \hat{ } \\ 2.078 i\hat{ } \\ 2.494j\hat{ } \end{array} \right] + \left[ \begin{array} {c} 0.296 \hat{ } \\ 0.592 i^v \\ 0.296j\hat{ } \end{array} \right] + \left[ \begin{array} {c} 0.331^v \\ 0.39i^v \\ 0.253j\hat{ } \end{array} \right] \end{equation</em>}

\begin{equation} v_{rot} = \left[ \begin{array} {c} 1.627 \hat{ } \\ 1.447 i\hat{ } \\ 3.043j\hat{ } \end{array}  \right] \end{equation</em>}

Note that the magnitude of the axis of rotation is not relevant as rotation does not involve magnitude.

Equivalent R3 Rotation

Using the Vector Rotation functionality of the Omni Quaternion Calculator  for an equivalent rotation in \mathbb{R}3, the point at (1, 2, 3) rotated by 60^o around (4, 5, 6) moves to (1.627, 1.447, 3.043). This matches the Wave Number rotation result obtained above.

The radius of the starting point is:

  • \sqrt{(|1 \hat{ }|^2 + |2i \hat{ }|^2 + |3j \hat{ }|^2)} =  \sqrt{14} = 3.74

The radius of the end point is:

  • \sqrt{(|1.627 \hat{ } |^2 + |1.447i \hat{ }|^2 + |3.043j \hat{ } |^2)}
  • = \sqrt{( 2.648 +2.093 + 9.259)} =\sqrt{14} = 3.74

The radii are the same as is expected after rotation.

Quaternion Equivalent

The following is a description of the Quaternion equivalent of 60^o(4^+ 5i^ + 6j (1^ + 2i^ + 3j^).

Pure Quaternions are Quaternions without a scalar. The \mathbb{R}3 vector equivalent in classical mathematics for the axis (4^ + 5i^ + 6j^) is (4, 5, 6) and for the Opposite Value rotated (1^+ 2i^ + 3j^) is (1, 2, 3).

Quaternions represent the rotation as follows:

  • (4, 5, 6) is (4i + 5j + 3k)

The unit vector of the axis of rotation:

  • u_r is (4i + 5j + 3k)/ \sqrt{(4^2 + 5^2 + 6^2)} = (0.456i + 0.57j + 0.683k)
  • (1, 2, 3) is (1i + 2j + 3k)

The following formula gives the quaternion of rotation, q_r, for a given unit vector (x, y, z) and angle of rotation \theta

  • q_r = cos(\frac{\theta}{2}) + (xi + yj + zk) * sin(\frac{\theta}{2})
  • So, q_r = cos(\frac{60^{o}}{2}) + (0.456i + 0.57j + 0.683k) * sin(\frac{60^{o}}{2})
  • = (0.866 + 0.228i + 0.285j + 0.342k)

q_r * q_v rotates the vector by the quaternion of rotation:

(0.866 + 0.228i + 0.285j + 0.342k)(1i + 2j + 3k)= (-1.824 + 1.037i + 1.39j + 2.769k)

To convert a quaternion back to an \mathbb{R}3 vector in classical maths, multiply the quaternion with the conjugate of the quaternion of rotation which is (0.866 - 0.228i - 0.285j - 0.342k)

  • (-1.824 + 1.037i + 1.39j + 2.769k)(0.866 - 0.228i - 0.285j - 0.342k)
  • = (1.627i + 1.447j + 3.043k)

This matches the Wave Number rotation result obtained above.

Next: Complex Rotations – Example 2

Previous: Reversal, Remain and Zero Rules

Share to:

Leave a Reply

Your email address will not be published. Required fields are marked *