How to recover three successive rotations of a vector

391 Views Asked by At

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.

1

There are 1 best solutions below

1
On

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.