Documentation

Quaternion Interpolation

Quaternion interpolation between two quaternions

Library

Utilities/Math Operations

Description

The Quaternion Interpolation block calculates the quaternion interpolation between two normalized quaternions by an interval fraction.

The two normalized quaternions are the two extremes between which the block calculates the quaternion.

Parameters

Methods

Specify the quaternion interpolation method to calculate the quaternion interpolation. These methods have different rotational velocities, depending on the interval fraction. For more information on interval fractions, see http://web.mit.edu/2.998/www/QuaternionReport1.pdf.

  • SLERP

    Quaternion slerp. Spherical linear quaternion interpolation method.

    Slerp(p,q,h)=p(p*q)h with h[0,1].

  • LERP

    Quaternion lerp. Linear quaternion interpolation method.

    LERP(p,q,h)=p(1h)+qh with h[0,1].

  • NLERP

    Normalized quaternion linear interpolation method.

    With r=LERP(p,q,h), NLERP(p,q,h)=r|r|.

Action for out-of-range input

Specifies whether out-of-range input causes a warning, error, or no action.

Inputs and Outputs

InputDimension TypeDescription

First

4-by-1 or 1-by-4 vector

First normalized quaternion for which to calculate the interpolation. This quaternion must be a normalized quaternion

Second

4-by-1 or 1-by-4 vector

Second normalized quaternion for which to calculate the interpolation. This quaternion must be a normalized quaternion.

Third

Scalar

Interval fraction by which to calculate the quaternion interpolation . This value varies between 0 and 1. It represents the intermediate rotation of the quaternion to be calculated. This fraction affects the interpolation method rotational velocities.

OutputDimension TypeDescription

First

double

Natural logarithm of quaternion.

Introduced in R2016a

Was this topic helpful?