Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Rotation Matrix to VRML Rotation

Convert rotation matrix into representation used in virtual world

Library

Simulink® 3D Animation™

Description

Takes an input of a rotation matrix and outputs the axis/angle rotation representation used for defining rotations in a virtual world. The rotation matrix can be either a 9-element column vector or a 3-by-3 matrix defined columnwise.

    Note:   This block works with VRML and X3D virtual worlds.

Parameters

Maximum value to treat input value as zero — The input is considered to be zero if it is equal to or lower than this value.

Rotation 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.

R=(R11R12R13R21R22R23R31R32R33)=(RxxRxyRxzRyxRyyRyzRzxRzyRzz)

In general, R requires three independent angles to specify the rotation fully. There are many ways to represent the three independent angles. Here are two:

  • You can form three independent rotation matrices R1, R2, R3, each representing a single independent rotation. Then compose the full rotation matrix R with respect to fixed coordinate axes as a product of these three: R = R3*R2*R1. The three angles are Euler angles.

  • You can represent R in terms of an axis-angle rotation n = (nx,ny,nz) and θ with n*n = 1. The three independent angles are θ and the two needed to orient n. Form the antisymmetric matrix:

    J^=(0nznynz0nxnynx0)

    Then Rodrigues' formula simplifies R:

    R=exp(θJ^)=I+J^sinθ+J^2(1cosθ)

Introduced in R2006a

Was this topic helpful?