squad

Computes the spherical quadrangle interpolation between quaternions.

// 1. compute the squad interpolation between two quaternions on a curve
const s0 = Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Quaternion());
const s1 = Quaternion.computeInnerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2], new Quaternion());
const q = Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t, new Quaternion());

// 2. compute the squad interpolation as above but where the first quaternion is a end point.
const s1 = Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Quaternion());
const q = Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Quaternion());

Return

The modified result parameter.

Parameters

q0

The first quaternion.

q1

The second quaternion.

s0

The first inner quadrangle.

s1

The second inner quadrangle.

t

The time in 0,1 used to interpolate.

result

The object onto which to store the result.

See also