2
$\begingroup$

I have a vector, which I rotated with respect to $x$, $y$ and $z$ axes, respectively.

Now I want to recover this operation, that means I want to bring it to the previous position by rotating it with $-\theta$, $-\alpha$ and $-\beta$, where $\theta$, $\alpha$ and $\beta$ are the amounts of initial rotation, in radians/degrees.

I tried to do it by computing the dot product of this vector with axis vectors ($(1,0,0)$ for $x$-axis, $(0,1,0)$ for $y$-axis and $(0,0,1)$ for $z$-axis).

However, this did not produce the right result possibly because It was rotated in 3d, thus the dot product was resulting in a different value that it should be.

What I should do in order to perform this operation? Thanks.

  • 0
    don't forget to reverse the order (if your last rotation was around $z$ your first reverse one should be around $z$ with the sign changed).2012-08-15

1 Answers 1

0

If you used Euler angles, simply multiply your vector by the rotation matrices in reverse order. If you used $\alpha$ around $\hat{x}$, then $\beta$ around $\hat{y}$, and finally $\gamma$ around $\hat{z}$ to get at a vector $v$, then the original vector $v_0$ is given by: $v_0 = Z(-\gamma)Y(-\beta)X(-\alpha)v$ Where $X,Y,Z$ are the rotation matrices.

  • 1
    More at [Rotation Matrix](http://en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions).2012-08-15