I have an object position in space determined by the angle α and the rotation vector (x, y, z)

I can not figure out how to get this vector for difficult turns?

Suppose I need to rotate an object first around the y axis by 90 °, and then around the z axis by 45 °. I take and multiply two matrixes of rotation

enter image description here

And how now from the resulting matrix to get the vector and angle?

  • Why do you want to extract this vector from the final matrix? - ampawd
  • @ampawd The program at the entrance takes exactly the vector. And the matrix is ​​more for understanding the question. It seems to me that it is easier to first calculate the final matrix, and then get a vector. Matrix they are clearer - Anton Shchyrov
  • one
    read here , given all the necessary formulas and conclusion. - ampawd
  • @ampawd Thank you! What you need - Anton Shchyrov

1 answer 1

Thanks for the link @ampawd

Suppose we have some rotation matrix

Then the angle of rotation can be calculated by the formula

And the components of the rotation vector itself

Where

If K = 0 , then we have a symmetric matrix. This means that the angle of rotation is 0 ° or 180 °. With an angle of 0 ° we do not need to do anything. At an angle of 180 °, the rotation vector takes the form