Main Content

Rotation Matrix to VR Rotation

R2026b

(Removed) Convert rotation matrix to axis/angle rotation

Rotation Matrix to VR Rotation has been removed. For more information, see Version History.

  • Rotation Matrix to VR Rotation block

Libraries:
Simulink 3D Animation / Utilities

Description

The Rotation Matrix to VR Rotation converts Rotation Matrix (defined columnwise as 3-by-3 matrix or as a 9-element column vector) into the Axis / Angle rotation representation used for defining rotations in VR.

Ports

Input

expand all

3D rotation, specified as a 3-by-3 columnwise-defined matrix, also known as a direction cosine matrix.

A representation of a three-dimensional spherical rotation as a 3-by-3 real, orthogonal matrix R: RTR = RRT = I, where I is the 3-by-3 identity and RT is the transpose of R. This matrix is also known as the direction cosine matrix (DCM). The DCM is the orientation of the object in space, relative to its parent node.

R=(R11R12R13R21R22R23R31R32R33)=(RxxRxyRxzRyxRyyRyzRzxRzyRzz)

Data Types: single | double

Output

expand all

Output rotation, returned as a 4-element vector in axis/angle notation, The first three elements specify the axis of rotation and the fourth element specifies the angle.

Parameters

expand all

Input signal value is considered to be zero if it is equal to or lower than the value set in this parameter. By default, the parameter is set to ε = 1e-12.

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"vrlib/Utilities/Rotation Matrix to VR Rotation"

Example: add_block("vrlib/Utilities/Rotation Matrix to VR Rotation","myModel/myBlock",MakeNameUnique="on")

Version History

Introduced in R2019a

expand all