Skip to content

quat_interpolateQuatInterpolateQuatInterpolatequat_interpolateT_quat_interpolate🔗

Short description🔗

quat_interpolateQuatInterpolateQuatInterpolatequat_interpolateT_quat_interpolate — Interpolation of two quaternions.

Signature🔗

quat_interpolate( quaternion QuaternionStart, quaternion QuaternionEnd, real InterpPos, out quaternion QuaternionInterpolated )void QuatInterpolate( const HTuple& QuaternionStart, const HTuple& QuaternionEnd, const HTuple& InterpPos, HTuple* QuaternionInterpolated )static void HOperatorSet.QuatInterpolate( HTuple quaternionStart, HTuple quaternionEnd, HTuple interpPos, out HTuple quaternionInterpolated )def quat_interpolate( quaternion_start: Sequence[float], quaternion_end: Sequence[float], interp_pos: Sequence[float] ) -> Sequence[float]

Herror T_quat_interpolate( const Htuple QuaternionStart, const Htuple QuaternionEnd, const Htuple InterpPos, Htuple* QuaternionInterpolated )

HQuaternion HQuaternion::QuatInterpolate( const HQuaternion& QuaternionEnd, const HTuple& InterpPos ) const

HQuaternion HQuaternion.QuatInterpolate( HQuaternion quaternionEnd, HTuple interpPos )

Description🔗

The operator quat_interpolateQuatInterpolate interpolates the two quaternions QuaternionStartquaternionStartquaternion_start and QuaternionEndquaternionEndquaternion_end at the interpolation position InterpPosinterpPosinterp_pos. This position must lie within the interval \([0,1]\). In the case of \(\textrm{InterpPos}=0\), the interpolated quaternion QuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionStartquaternionStartquaternion_start. In the case of \(\textrm{InterpPos}=1\), the interpolated quaternion QuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionEndquaternionEndquaternion_end.

The interpolation is done using spherical linear interpolation. As a consequence if both QuaternionStartquaternionStartquaternion_start and QuaternionEndquaternionEndquaternion_end are rotation quaternions, QuaternionInterpolatedquaternionInterpolatedquaternion_interpolated will be a rotation quaternion as well. Further, if InterpPosinterpPosinterp_pos is increased at constant speed, a point on the unit sphere that is rotated using QuaternionInterpolatedquaternionInterpolatedquaternion_interpolated travels with constant speed on an arc on the unit sphere.

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🔗

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

Start quaternion.

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

End quaternion.

InterpPosinterpPosinterp_pos (input_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Interpolation parameter.

Default: 0.50.5
Suggested values: 0.0, 0.25, 0.5, 0.75, 1.00.0, 0.25, 0.5, 0.75, 1.0

QuaternionInterpolatedquaternionInterpolatedquaternion_interpolated (output_control) quaternion → (real)HTuple (double)HQuaternion, HTuple (double)Sequence[float]Htuple (double)

Interpolated quaternion.

Combinations with other operators🔗

Combinations

Possible predecessors

axis_angle_to_quatAxisAngleToQuat, quat_normalizeQuatNormalize

Possible successors

quat_to_hom_mat3dQuatToHomMat3d, quat_rotate_point_3dQuatRotatePoint3d, quat_to_poseQuatToPose

See also

quat_rotate_point_3dQuatRotatePoint3d, quat_conjugateQuatConjugate, quat_composeQuatCompose, dual_quat_interpolateDualQuatInterpolate

Module🔗

Foundation