Given an axis of rotation and an angle, work out the rotation angles around x,y,z axis

175 Views Asked by At

I want to convert from one 3D rotation convention to another.

The first convention has an axis of rotation, $\boldsymbol{r}$ and an angle $\theta_r$ to rotate about this axis.

The second convention uses rotation angles $\theta_x$, $\theta_y$, $\theta_z$ about the x, y, z axis respectively.

My question is, how can we convert from the first convention to the second? Ie, given $\boldsymbol{r}$ and $\theta_r$, calculate $\theta_x$, $\theta_y$ and $\theta_z$. I am guessing there are multiple solutions to this problem, which is fine as long as I know at least one of them :)

1

There are 1 best solutions below

0
On BEST ANSWER

For anyone else who might be interested, I found a website which has some formulae for just this problem.

http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToEuler/index.htm

You give it an axis $\boldsymbol{r}=[r_x,r_y,r_z]^T$ and an angle $\theta_r$ and you get:

$\theta_x = \arctan( (r_x\sin(\theta_r)-r_yr_z(1-\cos(\theta_r)))/(1-(r_x^2+r_z^2)(1-\cos(\theta_r)) )$

$\theta_y = \arctan( (r_y\sin(\theta_r)-r_xr_z(1-\cos(\theta_r)))/(1-(r_y^2+r_z^2)(1-\cos(\theta_r)) )$

$\theta_z = \arcsin( r_xr_y(1-\cos(\theta_r))+r_z\sin(\theta_r) )$