-2

I have calculated the yaw,pitch and roll of the head from euler angles as follows in my code.

eulerangles = rotationMatrixToEulerAngles(rotation_matrix)
yaw = eulerangles[1]
pitch = eulerangles[0]
roll = eulerangles[2]

How do I use these values to find the angle from the axis? For instance if the head is rotated 360 degree, how do I know the angle of rotation from the center?

1 Answers1

0

This is in fact a liner algebra question rather a programming question. Please consider to formulate it again with mathematical symbols and move it to https://math.stackexchange.com/

A hint I can give you here is that the relation between rotation matrix and rotation angle in 3 denominational space is enter image description here, where A is the rotation matrix, tr(A) is the trace of the matrix and theta is the rotation angle.

englealuze
  • 1,086
  • 9
  • 14