WOLFRAM SYSTEM MODELER

from_nxz

Return orientation object from n_x and n_z vectors

Wolfram Language

In[1]:=
SystemModel["Modelica.Mechanics.MultiBody.Frames.TransformationMatrices.from_nxz"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

T = TransformationMatrices.from_nxz(n_x, n_z);

Description

It is assumed that the two input vectors n_x and n_z are resolved in frame 1 and are directed along the x and z axis of frame 2 (i.e., n_x and n_z are orthogonal to each other). The function returns the orientation object T to rotate from frame 1 to frame 2.

The function is robust in the sense that it returns always an orientation object T, even if n_z is not orthogonal to n_x. This is performed in the following way:
If n_x and n_z are not orthogonal to each other, first a unit vector e_z is determined that is orthogonal to n_x and is lying in the plane spanned by n_x and n_z. If n_x and n_z are parallel or nearly parallel to each other, a vector e_z is selected arbitrarily such that n_x and e_z are orthogonal to each other.

See also

Frames.from_nxz.

Syntax

T = from_nxz(n_x, n_z)

Inputs (2)

n_x

Type: Real[3]

Description: Vector in direction of x-axis of frame 2, resolved in frame 1

n_z

Type: Real[3]

Description: Vector in direction of z-axis of frame 2, resolved in frame 1

Outputs (1)

T

Type: Orientation

Description: Orientation object to rotate frame 1 into frame 2