Difference between revisions of "Quat2anax.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Converts a quaternion into angle-axis rotation parameters. Syntax: [rot_axis,rot_angle]=quat2anax(q) where q is a structure with four fields q.u, q.i, q.j, ...")
 
Line 1: Line 1:
−
Converts a quaternion into angle-axis rotation parameters. Syntax:
+
{{DISPLAYTITLE:quat2anax.m}} __NOTOC__
 +
Converts a quaternion into angle-axis rotation parameters.
  
−
                [rot_axis,rot_angle]=quat2anax(q)
+
==Syntax==
  
−
where q is a structure with four fields q.u, q.i, q.j, q.k giving the four components of the quaternion. Output:
+
    [rot_axis,rot_angle]=quat2anax(q)
  
−
    rot_axis - cartesian direction vector given as a row or column
+
==Arguments==
−
              with three real elements
 
  
−
  rot_angle - rotation angle in radians
+
    q  -  quaternion, a structure with four fields
 +
            q.u, q.i, q.j, q.k giving the four compo-
 +
            nents of the quaternion
 +
 
 +
==Outputs==
 +
 
 +
    rot_axis  - cartesian direction vector as a row
 +
                with three real elements
 +
 
 +
    rot_angle - rotation angle in radians
 +
 
 +
==Notes==
 +
See the notes on [[rotation conventions]] for the basic definitions of rotations in ''Spinach''.
 +
 
 +
==See also==
 +
Links to related functions.
 +
 
 +
 
 +
''Version 2.3, authors: [[Ilya Kuprov]]''

Revision as of 14:36, 26 December 2018

Converts a quaternion into angle-axis rotation parameters.

Syntax

    [rot_axis,rot_angle]=quat2anax(q)

Arguments

    q   -   quaternion, a structure with four fields
            q.u, q.i, q.j, q.k giving the four compo-
            nents of the quaternion

Outputs

    rot_axis  - cartesian direction vector as a row 
                with three real elements
    rot_angle - rotation angle in radians

Notes

See the notes on rotation conventions for the basic definitions of rotations in Spinach.

See also

Links to related functions.


Version 2.3, authors: Ilya Kuprov