quat_interpolateT_quat_interpolateQuatInterpolateQuatInterpolatequat_interpolate (Operator)

Name

quat_interpolateT_quat_interpolateQuatInterpolateQuatInterpolatequat_interpolate — Interpolation of two quaternions.

Signature

quat_interpolate( : : QuaternionStart, QuaternionEnd, InterpPos : QuaternionInterpolated)

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

void QuatInterpolate(const HTuple& QuaternionStart, const HTuple& QuaternionEnd, const HTuple& InterpPos, HTuple* QuaternionInterpolated)

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

static void HOperatorSet.QuatInterpolate(HTuple quaternionStart, HTuple quaternionEnd, HTuple interpPos, out HTuple quaternionInterpolated)

HQuaternion HQuaternion.QuatInterpolate(HQuaternion quaternionEnd, HTuple interpPos)

def quat_interpolate(quaternion_start: Sequence[float], quaternion_end: Sequence[float], interp_pos: Sequence[float]) -> Sequence[float]

Description

The operator quat_interpolatequat_interpolateQuatInterpolateQuatInterpolateQuatInterpolatequat_interpolate interpolates the two quaternions QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStartquaternion_start and QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEndquaternion_end at the interpolation position InterpPosInterpPosInterpPosInterpPosinterpPosinterp_pos. This position must lie within the interval [0,1]. In the case of InterpPosInterpPosInterpPosInterpPosinterpPosinterp_pos=0, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStartquaternion_start. In the case of InterpPosInterpPosInterpPosInterpPosinterpPosinterp_pos=1, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEndquaternion_end.

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

Execution Information

Parameters

QuaternionStartQuaternionStartQuaternionStartQuaternionStartquaternionStartquaternion_start (input_control)  quaternion HQuaternion, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Start quaternion.

QuaternionEndQuaternionEndQuaternionEndQuaternionEndquaternionEndquaternion_end (input_control)  quaternion HQuaternion, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

End quaternion.

InterpPosInterpPosInterpPosInterpPosinterpPosinterp_pos (input_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Interpolation parameter.

Default value: 0.5

Suggested values: 0.0, 0.25, 0.5, 0.75, 1.0

QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolatedquaternion_interpolated (output_control)  quaternion HQuaternion, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Interpolated quaternion.

Possible Predecessors

axis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuatAxisAngleToQuataxis_angle_to_quat, quat_normalizequat_normalizeQuatNormalizeQuatNormalizeQuatNormalizequat_normalize

Possible Successors

quat_to_hom_mat3dquat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3dQuatToHomMat3dquat_to_hom_mat3d, quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3d, quat_to_posequat_to_poseQuatToPoseQuatToPoseQuatToPosequat_to_pose

See also

quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3d, quat_conjugatequat_conjugateQuatConjugateQuatConjugateQuatConjugatequat_conjugate, quat_composequat_composeQuatComposeQuatComposeQuatComposequat_compose, dual_quat_interpolatedual_quat_interpolateDualQuatInterpolateDualQuatInterpolateDualQuatInterpolatedual_quat_interpolate

Module

Foundation