Version:

Last Modified: December 18, 2017

Rotates a three-dimensional Cartesian coordinate in the counterclockwise direction using the direction method.

3-by-3 direction angle or direction cosine matrix.

If **rotation matrix type** is Direction Cosines, each element in the rotation matrix must be in the range of [-1, 1].

Type of the rotation matrix.

Name | Value | Description |
---|---|---|

Direction Angles | 0 | The rotation matrix contains the direction angles, or the angles between the x-, y-, and z-axes, and the line segments from the origin to the input coordinates. |

Direction Cosines | 1 | The rotation matrix contains the direction cosines, or the cosines of the direction angles. |

**Default: **Direction Angles

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

The following equation describes how this node rotates three-dimensional Cartesian coordinates using the direction method:

$\left[\begin{array}{c}x\prime \\ y\prime \\ z\prime \end{array}\right]=R\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$

where

*x*,*y*, and*z*are the x-, y-, and z-coordinates before the rotation*x*',*y*', and*z*' are the x-, y-, and z-coordinates after the rotation**R**is the rotation matrix you specify in**rotation matrix**if**rotation matrix type**is**Direction Cosines**. If**rotation matrix type**is**Direction Angles**, $R=\left[\begin{array}{ccc}\mathrm{cos}{\alpha}_{1}& \mathrm{cos}{\beta}_{1}& \mathrm{cos}{\gamma}_{1}\\ \mathrm{cos}{\alpha}_{2}& \mathrm{cos}{\beta}_{2}& \mathrm{cos}{\gamma}_{2}\\ \mathrm{cos}{\alpha}_{3}& \mathrm{cos}{\beta}_{3}& \mathrm{cos}{\gamma}_{3}\end{array}\right]$

where

*α*_{1},*β*_{1}, and*γ*_{1}are the direction angles of the x'-axis to the x-, y-, and z-axes*α*_{2},*β*_{2}, and*γ*_{2}are the direction angles of the y'-axis to the x-, y-, and z-axes*α*_{3},*β*_{3}, and*γ*_{3}are the direction angles of the z'-axis to the x-, y-, and z-axes

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application