Difference between revisions of "Anax2dcm.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(→‎Notes)
(sync with Spinach main f053e432: active-convention description, usage and quat2dcm notes, block formatting)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:anax2dcm.m}} __NOTOC__
 
{{DISPLAYTITLE:anax2dcm.m}} __NOTOC__
−
Converts angle-axis rotation parameters into a directional cosine matrix.
+
Converts angle-axis rotation parameters to a direction cosine matrix in the active convention, matching the one used by [[euler2dcm.m]] function. Angle should be in radians, axis is normalized by the function.
  
 
==Syntax==
 
==Syntax==
  
−
    q=anax2dcm(rot_axis,rot_angle)
+
              dcm=anax2dcm(rot_axis,rot_angle)
  
−
==Arguments==
+
==Parameters==
  
−
    rot_axis - cartesian direction vector given as a
+
      rot_axis - cartesian direction vector given as
−
                 row or column with three real elements
+
                 a row or column with three real ele-
 +
                ments
 
   
 
   
 
     rot_angle - rotation angle in radians
 
     rot_angle - rotation angle in radians
Line 15: Line 16:
 
==Outputs==
 
==Outputs==
  
−
    dcm       - 3x3 directional cosine matrix
+
          dcm - directional cosine matrix
  
 
==Notes==
 
==Notes==
−
Both angle-axis and DCM convention are numerically stable. This conversion has no singularities.
+
 
 +
Both angle-axis and DCM convention are numerically stable. This conversion has no singularities. See the notes on [[rotation conventions]] for the basic definitions of rotations in ''Spinach''.
 +
 
 +
The resulting rotation matrix is a 3x3 matrix to be used as follows:
 +
 
 +
        v=R*v    (for 3x1 vectors)
 +
        A=R*A*R' (for 3x3 interaction tensors)
 +
 
 +
Matlab's Aerospace Toolbox quat2dcm() returns the transpose of this matrix for the same rotation.
  
 
==See also==
 
==See also==
−
[[euler2dcm.m]], [[dcm2euler.m]], [[euler2wigner.m]], [[dcm2wigner.m]]
 
  
 +
[[euler2dcm.m]], [[dcm2euler.m]], [[wigner.m]], [[dcm2wigner.m]], [[anax2quat.m]], [[axis_tsymm.m]], [[euler_sup.m]], [[quat2anax.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]]
  
 
''Version 2.3, authors: [[Ilya Kuprov]]''
 
''Version 2.3, authors: [[Ilya Kuprov]]''

Latest revision as of 06:31, 30 August 2026

Converts angle-axis rotation parameters to a direction cosine matrix in the active convention, matching the one used by euler2dcm.m function. Angle should be in radians, axis is normalized by the function.

Syntax

             dcm=anax2dcm(rot_axis,rot_angle)

Parameters

     rot_axis - cartesian direction vector given as
                a row or column with three real ele-
                ments

    rot_angle - rotation angle in radians

Outputs

          dcm - directional cosine matrix

Notes

Both angle-axis and DCM convention are numerically stable. This conversion has no singularities. See the notes on rotation conventions for the basic definitions of rotations in Spinach.

The resulting rotation matrix is a 3x3 matrix to be used as follows:

        v=R*v    (for 3x1 vectors)
        A=R*A*R' (for 3x3 interaction tensors)

Matlab's Aerospace Toolbox quat2dcm() returns the transpose of this matrix for the same rotation.

See also

euler2dcm.m, dcm2euler.m, wigner.m, dcm2wigner.m, anax2quat.m, axis_tsymm.m, euler_sup.m, quat2anax.m, rotmat_align.m, rotor_stack.m, xyz2sph.m, Kernel_utilities

Version 2.3, authors: Ilya Kuprov