0
$\begingroup$

If I have 3 rotation values for x-axis, y-axis and z-axis, how can I generate the arbitrary axis unit vector and angle theta, so that I can use them in this

https://en.wikipedia.org/wiki/Rotation_matrix

enter image description here

Does anyone know?

Thanks

1 Answers 1

3

The problem with having three rotation values for x, y, and $z$ is that the order in which you apply them affects the result: rotating 30 degrees around the $x$ axis, then the $y$ axis, then the $z$ axis gives different results from rotation 30 degrees around $z$, $y$, $x$ in that order.

So we can't answer your question without knowing what you mean to do: in which order do you want these rotations to take place? That ambiguity is exactly why the Rodrigues matrix you've written down is so nice: it's completely unambiguous.

But a partial answer is this: $$ R_Y(t) = \begin{bmatrix} \cos t & 0 & -\sin t \\ 0 & 1 & 0 \\ \sin t & 0 & \cos t \end{bmatrix} $$ is the matrix for rotating around the $y$ axis by angle $t$; you can write down similar matrices for rotating about $x$ or $z$ by putting the "1" in the $xx$ entry or the $zz$ entry.

Then rotating in $x$, then $y$, then $z$ comes from computing the product matrix $$ R_Z(t_z) R_Y(t_y) R_X(t_x). $$