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_interpolateQuatInterpolateQuatInterpolatequat_interpolate interpolates the two quaternions QuaternionStartQuaternionStartQuaternionStartquaternionStartquaternion_start and QuaternionEndQuaternionEndQuaternionEndquaternionEndquaternion_end at the interpolation position InterpPosInterpPosInterpPosinterpPosinterp_pos. This position must lie within the interval [0,1]. In the case of InterpPosInterpPosInterpPosinterpPosinterp_pos=0, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionStartQuaternionStartQuaternionStartquaternionStartquaternion_start. In the case of InterpPosInterpPosInterpPosinterpPosinterp_pos=1, the interpolated quaternion QuaternionInterpolatedQuaternionInterpolatedQuaternionInterpolatedquaternionInterpolatedquaternion_interpolated corresponds to QuaternionEndQuaternionEndQuaternionEndquaternionEndquaternion_end.

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

Execution Information

Parameters

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

Start quaternion.

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

End quaternion.

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

Interpolation parameter.

Default: 0.5

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

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

Interpolated quaternion.

Possible Predecessors

axis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuataxis_angle_to_quat, quat_normalizequat_normalizeQuatNormalizeQuatNormalizequat_normalize

Possible Successors

quat_to_hom_mat3dquat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3dquat_to_hom_mat3d, quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3d, quat_to_posequat_to_poseQuatToPoseQuatToPosequat_to_pose

See also

quat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3d, quat_conjugatequat_conjugateQuatConjugateQuatConjugatequat_conjugate, quat_composequat_composeQuatComposeQuatComposequat_compose, dual_quat_interpolatedual_quat_interpolateDualQuatInterpolateDualQuatInterpolatedual_quat_interpolate

Module

Foundation