# Convert RotationMatrix to RotationTransform

Is it possible to convert RotationMatrix to RotationTransform ? I guess it should exist a function to do this

Thank you for your help

One only needs to apply AffineTransform[] to the result of RotationMatrix[]; e.g.

AffineTransform[RotationMatrix[π/3, Normalize[{1, 2, 3}]]] ===
RotationTransform[π/3, Normalize[{1, 2, 3}]]
True


An additional advantage to using AffineTransform[] is that one can put in other classes of rotation matrices, instead of just RotationMatrix[]; e.g. AffineTransform[RollPitchYawMatrix[{-π/4, π/6, 3 π/5}]] or AffineTransform[EulerMatrix[{π/2, -π/5, 2 π/3}]].

• TransformtionFunction works the same: 'TransformationFunction[ RotationMatrix[[Pi]/3, Normalize[{0, 0, 1}]]] == RotationTransform[Pi/3]' – bill s Sep 29 '18 at 13:23
• @bill, since TransformationFunction[] takes a homogeneous transformation matrix as an argument, in general one needs to augment the starting matrix beforehand. – J. M. will be back soon Sep 29 '18 at 13:42
• The role of the Normalize[0,0,1] is exactly the augmentation, just as with AffineTransform – bill s Sep 29 '18 at 18:21
• Right; RotationMatrix[π/3, Normalize[{0, 0, 1}] effectively says "rotate by $\pi/3$ radians anticlockwise over the $z$-axis", which does correspond to a rotation in the $x$-$y$ plane. – J. M. will be back soon Sep 29 '18 at 18:23