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}]]
.
TransformationFunction[]
takes a homogeneous transformation matrix as an argument, in general one needs to augment the starting matrix beforehand.
$\endgroup$
Commented
Sep 29, 2018 at 13:42
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.
$\endgroup$
Commented
Sep 29, 2018 at 18:23