Difference between revisions of "Qter2anax.m"
(sync with Spinach main f053e432: new page for qter2anax.m (renamed from quat2anax.m)) |
(version fragment to 2.13 per IK 2026-08-30) |
||
| Line 25: | Line 25: | ||
[[euler2dcm.m]], [[wigner.m]], [[anax2qter.m]], [[anax2dcm.m]], [[axis_tsymm.m]], [[dcm2euler.m]], [[dcm2wigner.m]], [[euler_sup.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]] | [[euler2dcm.m]], [[wigner.m]], [[anax2qter.m]], [[anax2dcm.m]], [[axis_tsymm.m]], [[dcm2euler.m]], [[dcm2wigner.m]], [[euler_sup.m]], [[rotmat_align.m]], [[rotor_stack.m]], [[xyz2sph.m]], [[Kernel_utilities]] | ||
| − | ''Version 2. | + | ''Version 2.13, authors: [[Ilya Kuprov]]'' |
Latest revision as of 10:14, 30 August 2026
Converts a quaternion representation of a rotation into angle-axis rotation parameters. The quaternion is first normalised to unit Euclidean length; the rotation angle is then 2*atan2(n,q.u), where n is the norm of the vector part, and the rotation axis is the vector part divided by n. When the vector part has zero norm, the rotation is the identity, and the function returns a zero angle about the [0 0 1] axis.
Syntax
[rot_axis,rot_angle]=qter2anax(q)
Parameters
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
euler2dcm.m, wigner.m, anax2qter.m, anax2dcm.m, axis_tsymm.m, dcm2euler.m, dcm2wigner.m, euler_sup.m, rotmat_align.m, rotor_stack.m, xyz2sph.m, Kernel_utilities
Version 2.13, authors: Ilya Kuprov