How to get the rotaion matrix which maps PrincipalMomentsOfInertia into XYZMomentsOfInertia?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Can I ask for help with how to retreive the rotation matrix that transforms MassProperties.XYZMomentsOfInertia to MassProperties.PrincipalMomentsOfInertia when they are represented as matrices.
As you may know, mathematically speaking, the principal inertia tensor (Ii) is mapped into the inertia tensor (Ix) with respect to a coordinate frame (frame x) whose origin coincides with the origin of the inertia frame (the center of mass) and whose axes are aligned with those of the global coordinate frame using the rotation matrix (Rxi) describing the orientation of the principal inertia frame with respect to the frame x like:
Ix = Rxi @ Ii @ Rxi.T
where @ is matrix muliplication and .T is transpose.
In my understanding, PrincipalMomentsOfInertia is Ii and XYZMomentsOfInertia is Ix. And I know that MassProperties.RotationToPrincipal, which may provide the orientation of the principal inertia frame with respect to the frame x. But what type of orientation representation is it? Is it Euler angles? If so, what is the order, X-Y-Z Euler or Z-Y-X Euler?
Besides, does anybody know a convenient way to get a 4x4 Matirx object (homogeneous version of Rxi) from the output of RotationToPrincipal only using Inventor API?
Thanks in advance!