<< CL_rot_angVelocity Coordinates and frames CL_rot_angles2quat >>

CelestLab >> Coordinates and frames > CL_rot_angles2matrix

CL_rot_angles2matrix

Rotation angles to transformation matrix

Calling Sequence

M = CL_rot_angles2matrix(naxes,angles)

Description

Parameters

naxes :

Axis numbers: 1=x-axis, 2=y-axis or 3=z-axis (1xP or Px1)

angles :

Rotation angles around respective axes [rad] (PxN)

M :

Transformation matrix (3x3xN).

Authors

See also

Examples

// 60deg rotation around X:
M = CL_rot_angles2matrix([1],[%pi/3])

// 60deg rotation around X followed by 90deg around Y:
M = CL_rot_angles2matrix([1,2],[%pi/3;%pi/2])

// Meaning of M:
M = CL_rot_angles2matrix(3, 10*%pi/180)
u = [1;0;0]  // coordinates of vector u in initial frame
v = M*u      // coordinates of vector u in final frame
urot = M'*u  // image of rotation of u in initial frame

Report an issue
<< CL_rot_angVelocity Coordinates and frames CL_rot_angles2quat >>