January 24, 2025
Search
Search
Close this search box.

R3 – Complex Rotations – Example 3

This post provides an example of a rotation chain involving three consecutive rotations. It uses the Wave Number Rotation formula adapted from Rodrigues’ formula and shows the Quaternion equivalent.

Wave Number Rotation Formula

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

Example 3

Rotation 1

In this example, 3 rotations take place one after the other:

  • Rotation 1: 120^{\hat{ }o} \circlearrowleft ^{(1\hat{ }, 2\hat{ }, 1\hat{ })} (1^v + i^v + j\hat{ })
  • Rotation 2: 45^{\hat{ }o} \circlearrowleft ^{(1\hat{ }, 2\hat{ }, 3\hat{ })} (Result of Rotation 1)
  • Rotation 3: 60^{\hat{ }o} \circlearrowleft ^{(4\hat{ }, 5\hat{ }, 6\hat{ })} (Result of Rotation 2)

Calculate the chain of rotations using the Wave Number v_rot formula.

Rotation 1:

    \begin{equation*}v_{rot} =\end{equation*}

    \begin{equation*}\tiny (\left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ } \end{array} \right] \cdot \left[ \begin{array} {c} 1 ^v \\  i^v \\ j\hat{ } \end{array} \right]) \left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ } \end{array} \right]  + sin120^{\hat{ }o}(\left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ }  \end{array} \right] \times \left[ \begin{array} {c} 1 ^v \\ i^v \\ j\hat{ } \end{array} \right]) + cos120^{\hat{ }o}((\left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ }  \end{array} \right] \times \left[ \begin{array} {c} 1 ^v \\  i^v \\ j\hat{ } \end{array} \right]) \times \left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ } \end{array} \right])\end{equation*}




    \begin{equation*}v_{rot} = ^-0.817\left[ \begin{array} {c} 0.408\hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ } \end{array} \right] + 0.866(\left[ \begin{array} {c} 1.225 \hat{ } \\ 0.816 i^v \\ 0.409j\hat{ }  \end{array} \right]) + ^-0.5(\left[ \begin{array} {c} 1.225 \hat{ } \\ 0.816 i^v \\ 0.409j\hat{ }  \end{array} \right] \times  \left[ \begin{array} {c} 0.408 \hat{ } \\ 0.817 i\hat{ } \\ 0.408j\hat{ } \end{array} \right])\end{equation*}



    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 0.333 ^v \\ 0.667 i^v \\ 0.333j^v \end{array} \right] + \left[ \begin{array} {c} 1.061 \hat{ } \\ 0.707 i^v \\ 0.354j\hat{ }  \end{array} \right] +  \left[ \begin{array} {c} 0.331\hat{ } \\ 0.3167i\hat{ }\\ 0.667j^v \end{array} \right]\end{equation*}



    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 1.06 \hat{ } \\ 1.21 i^v \\ 0.65j^v \end{array} \right]\end{equation*}


Rotation 2:

    \begin{equation*}v_{rot} =\end{equation*}


    \begin{equation*}\tiny\left[ \begin{array} {c} 0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right] \cdot \left[ \begin{array} {c} 1.061 \hat{ } \\ 1.21 i^v \\ 0.65j^v \end{array} \right] \left[ \begin{array} {c}0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \\ \end{array} \right] + sin45^{\hat{ }o}(\left[ \begin{array} {c} 0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1.061 \hat{ } \\ 1.207 i^v \\ 0.646j^v \end{array} \right]) + cos45^{\hat{ }o}(\left[ \begin{array} {c} 0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1.061 \hat{ } \\ 1.207 i^v \\ 0.646j^v \end{array} \right]) \times \left[ \begin{array} {c} 0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right]\end{equation*}

    \begin{equation*}v_{rot} = ^-0.880\left[ \begin{array} {c} 0.267\hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right] + 0.707(\left[ \begin{array} {c} 0.622 \hat{ } \\ 1.023 i\hat{ } \\ 0.89j^v \end{array} \right]) + 0.707(\left[ \begin{array} {c} 0.622 \hat{ } \\ 1.023 i\hat{ } \\ 0.89j^v \end{array} \right] \times \left[ \begin{array} {c} 0.267 \hat{ } \\ 0.535 i\hat{ } \\ 0.802j\hat{ } \end{array} \right])\end{equation*}

    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 0.235 ^v \\ 0.471 i^v \\ 0.706j^v \end{array} \right] + \left[ \begin{array} {c} 0.44 \hat{ } \\ 0.724 i\hat{ } \\ 0.629j^v \end{array} \right] + \left[ \begin{array} {c} 0.917\hat{ } \\ 0.521i^v\\ 0.043j\hat{ } \end{array} \right]\end{equation*}

    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 1.12 \hat{ } \\ 0.27 i^v \\ 1.3j^v \end{array} \right]\end{equation*}

Rotation 3:

    \begin{equation*}v_{rot} =\end{equation*}


    \begin{equation*}\tiny\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \cdot \left[ \begin{array} {c} 1.12 \hat{ } \\ 0.27 i^v \\ 1.3j^v \end{array} \right] \left[ \begin{array} {c}0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \\ \end{array} \right] + sin60^{\hat{ }o}(\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1.122 \hat{ } \\ 0.268 i^v \\ 1.292j^v \end{array} \right]) + cos60^{\hat{ }o}(\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] \times \left[ \begin{array} {c} 1.122 \hat{ } \\ 0.268 i^v \\ 1.292j^v \end{array} \right]) \times \left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right])\end{equation*}

    \begin{equation*}\setlength\arraycolsep{2pt}v_{rot} = ^-0.525\left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right] + 0.866(\left[ \begin{array} {c} 0.553^v \\ 1.357 i\hat{ } \\ 0.762j^v \end{array} \right]) + 0.5(\left[ \begin{array} {c} 0.553^v \\ 1.357 i\hat{ } \\ 0.762j^v \end{array} \right] \times \left[ \begin{array} {c} 0.456 \hat{ } \\ 0.57 i\hat{ } \\ 0.684j\hat{ } \end{array} \right])\end{equation*}

    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 0.239 ^v \\ 0.299 i^v \\ 0.359j^v \end{array} \right] + \left[ \begin{array} {c} 0.479^v \\ 1.175 i\hat{ } \\ 0.66j^v \end{array} \right] + \left[ \begin{array} {c} 0.681\hat{ } \\ 0.015i\hat{ }\\ 0.467j^v \end{array} \right]\end{equation*}

    \begin{equation*}v_{rot} = \left[ \begin{array} {c} 0.037^v \\ 0.891 i\hat{ } \\ 1.485j^v \end{array} \right]\end{equation*}

Equivalent R3 Rotation

Using the Vector Rotation functionality of the Omni Quaternion Calculator for an equivalent chain of rotations in \mathbb{R}3, results as follows:

  • Rotation 1: (-1, -1, 1) rotated by 120^{o} around (1, 2, 1) moves to (1.06, -1.21, -0.65)

  • Rotation 2: (1.06, -1.21, -0.65) rotated by 45^{o} around (1, 2 ,3) moves to (1.12,-0.27, -1.3)

  • Rotation 3: (1.12,-0.27, -1.3) rotated by 60^{o} around (4, 5, 6) moves to (-0.037, 0.891, -1.485)

This matches the Wave Number rotation result obtained above.

Equivalent Quaternion Rotation

Setting up Quaternion Equations

The following describes the Quaternion equivalent of this chain of Wave Number rotations:

  • Rotation 1: Rotate q_v (-i, -j, k) by 120^o around (i, 2j, k)
  • Rotation 2: Rotate the result of rotation 1 by 45^o around (i, 2j ,3k)
  • Rotation 3: Rotate the result of rotation 2 by 60^o around (4i, 5j, 6k) 

 

The unit vectors of the axes of rotation are:

  • Rotation 1:
    • (i + 2j + k)/\sqrt{(1^2 + 2^2 + 1^2} = (i + 2j + k)/2.445 = (0.408i + 0.816j + 0.408k)
  • Rotation 2:
    • (i + 2j + 3k)/\sqrt{(1^2 + 2^2 + 3^2)}= (i + 2j +3k)/3.742 = (0.267i + 0.535j + 0.802k)
  • Rotation 3:
    • (4i + 5j + 6k)/\sqrt{(4^2 + 5^2 + 6^2)} = (4i + 5j + 6k)/8.774 = (0.456i + 0.57j + 0.684k)

 

The Quaternions of Rotations are:

Rotation 1: q_{r1} = 0.5 + (0.408i + 0.816j + 0.408k) * 0.866= (0.5 + 0.354i + 0.707j + 0.354k)

Rotation 2: q_{r2} = 0.924 + (0.267i + 0.535j + 0.802k) * 0.383 = (0.924 + 0.102i + 0.205j + 0.307k)

Rotation 3: q_{r3} = 0.866 + (0.456i + 0.57j + 0.684k) * 0.5 = (0.866 + 0.228i + 0.285j + 0.342k)

 

Performing Quaternion Equations

The quaternion of rotation, q_{r1} rotates the quaternion vector, q_v as follows:

  • (0.5 + 0.354i + 0.707j + 0.354k)(-i -j + k) = (0.707 + 0.561i -1.207j + 0.854k)

 

q_{r2} rotates the result of the first rotation:

  • (0.924 + 0.102i + 0.205j + 0.307k)(0.707 + 0.561i -1.207j + 0.854k) = (0.581 + 1.135i -0.886j + 0.767k)

 

q_{r3} rotates the result of the second rotation:

  • (0.866 + 0.228i + 0.285j + 0.342k)(0.581 + 1.135i -0.886j + 0.767k)= (0.234 + 1.637i -0.388j + 0.338k)

 

Completing the Quaternion Sandwich

The Quaternion sandwich needs to be completed to obtain a result in \mathbb{R}3. Consequently, the result so far needs to be multiplied by the conjugate of the three rotations (q_{r3} * q_{r2}) * q_{r1}.

  • The product of the three rotations is (q_{r3} * q_{r2}) * q_{r1} = (0.866 + 0.228i + 0.285j + 0.342k)(0.924 + 0.102i + 0.205j + 0.307k)(0.5 + 0.354i + 0.707j + 0.354k) = (-0.304 + 0.095i + 0.736j + 0.597k)
  • Therefore the conjugate of the three rotations is (-0.304 -0.095i -0.736j -0.597k)
  • Giving the product of the result so far and the conjugate as (0.234 + 1.637i -0.388j + 0.338k)(-0.304 -0.095i -0.736j -0.597k)= (-0.039i + 0.891j -1.485k)

 

The result matches the Wave Numbers outcome of (0.037^v + 0.891i\hat{ } + 1.485j^v), allowing for minor rounding differences due to the number of multiplications.

Next: Comparing Wave Number and Quaternion Efficiency

Previous: Complex Rotation Example 2

Share to:

Leave a Reply

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