Vizard 8 » Reference » Matrix transforms » Quaternions
8.0

Quaternions

Quaternion Interpolation

You are likely already familiar with Euler angle rotations around 3 cardinal axes. Another representation is a direction vector (to look along) and a roll (or twist) about it. If you wanted to smoothly blend from one orientation to another, you could interpolate the 3 Euler angles, or 3 components of the direction vector and twist, from one to the other. However, this will pass through un-ideal orientations in the interim without using numerical integration techniques. This is similar to interpolating between two RGBs, rather than two HSVs, and getting brown instead of bright yellow in between them.

 

To easily and correctly interpolate between two orientations, two quaternions are interpolated in 4D space. A quaternion is a 4-Dimensional vector that represents any rotation in 3D space. Since a quaternion is normalized across its 4 components, it can be thought of as a radius vector to a point on a 4-Dimensional unit sphere. The best interpolation is along the shortest arc between two points on that globe. This is called Spherical Linear Interpolation (SLERP).

See also

In this section:

Matrix transform basics

Combining transforms

Matrix Transforms Command Table

Other sections:

3D model transforms basics

Example scripts:

Matrix transformations