Difference between revisions of "Anax2qter.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(sync with Spinach main f053e432: new page for anax2qter.m (renamed from anax2quat.m))
 
(version fragment to 2.13 per IK 2026-08-30)
 
Line 24: Line 24:
 
[[euler2dcm.m]], [[dcm2euler.m]], [[wigner.m]], [[dcm2wigner.m]], [[anax2dcm.m]], [[axis_tsymm.m]], [[euler_sup.m]], [[qter2anax.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]]
 
[[euler2dcm.m]], [[dcm2euler.m]], [[wigner.m]], [[dcm2wigner.m]], [[anax2dcm.m]], [[axis_tsymm.m]], [[euler_sup.m]], [[qter2anax.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]]
  
−
''Version 2.11, authors: [[Gareth Charnock]], [[Ilya Kuprov]]''
+
''Version 2.13, authors: [[Gareth Charnock]], [[Ilya Kuprov]]''

Latest revision as of 09:14, 30 August 2026

Converts angle-axis rotation parameters into a quaternion. The direction vector is first normalised to unit Euclidean length; the scalar part of the quaternion is then cos(rot_angle/2), and the three vector components are the elements of the normalised axis multiplied by sin(rot_angle/2).

Syntax

    q=anax2qter(rot_axis,rot_angle)

Parameters

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

    rot_angle - rotation angle in radians

Outputs

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

Notes

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

See also

euler2dcm.m, dcm2euler.m, wigner.m, dcm2wigner.m, anax2dcm.m, axis_tsymm.m, euler_sup.m, qter2anax.m, rotmat_align.m, rotor_stack.m, xyz2sph.m, Kernel_utilities

Version 2.13, authors: Gareth Charnock, Ilya Kuprov