Skip to content

quat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3dquat_to_hom_mat3dT_quat_to_hom_mat3d🔗

Short description🔗

quat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3dquat_to_hom_mat3dT_quat_to_hom_mat3d — Convert a quaternion into the corresponding rotation matrix.

Signature🔗

quat_to_hom_mat3d( quaternion Quaternion, out hom_mat3d RotationMatrix )void QuatToHomMat3d( const HTuple& Quaternion, HTuple* RotationMatrix )static void HOperatorSet.QuatToHomMat3d( HTuple quaternion, out HTuple rotationMatrix )def quat_to_hom_mat3d( quaternion: Sequence[float] ) -> Sequence[float]

Herror T_quat_to_hom_mat3d( const Htuple Quaternion, Htuple* RotationMatrix )

HHomMat3D HQuaternion::QuatToHomMat3d( ) const

HHomMat3D HQuaternion.QuatToHomMat3d( )

Description🔗

The operator quat_to_hom_mat3dQuatToHomMat3d converts a unit quaternion Quaternionquaternionquaternion into its corresponding rotation matrix RotationMatrixrotationMatrixrotation_matrix.

The RotationMatrixrotationMatrixrotation_matrix for a quaternion \(x=x_{0}+x_{1}i+x_{2}j+x_{3}k\) is given by:

\[\begin{eqnarray*} \left( \begin{array}{ccc} x_{0}^2+x_{1}^2-x_{2}^2-x_{3}^2 & 2 x_{1} x_{2}-2 x_{0} x_{3} & 2 x_{0} x_{2}+2 x_{1} x_{3} \\ 2 x_{0} x_{3}+2 x_{1} x_{2} & x_{0}^2-x_{1}^2+x_{2}^2-x_{3}^2 & 2 x_{2} x_{3}-2 x_{0} x_{1} \\ 2 x_{1} x_{3}-2 x_{0} x_{2} & 2 x_{0} x_{1}+2 x_{2} x_{3} & x_{0}^2-x_{1}^2-x_{2}^2+x_{3}^2 \end{array} \right) \end{eqnarray*}\]

Attention🔗

RotationMatrixrotationMatrixrotation_matrix will only be a valid rotation matrix if Quaternionquaternionquaternion is a unit quaternion.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Quaternionquaternionquaternion (input_control) quaternion → (real)HTuple (double)HQuaternion, HTuple (double)Sequence[float]Htuple (double)

Rotation quaternion.

RotationMatrixrotationMatrixrotation_matrix (output_control) hom_mat3d → (real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

Rotation matrix.

Combinations with other operators🔗

Combinations

Possible predecessors

axis_angle_to_quatAxisAngleToQuat, quat_composeQuatCompose

Possible successors

affine_trans_point_3dAffineTransPoint3d

See also

axis_angle_to_quatAxisAngleToQuat, quat_rotate_point_3dQuatRotatePoint3d, quat_to_poseQuatToPose, quat_normalizeQuatNormalize, quat_conjugateQuatConjugate, quat_interpolateQuatInterpolate

Module🔗

Foundation