Deborah R. Fowler

Quaternion

Posted April 7 2019 Updated March 19 2026

Quaternions are used frequently in Houdini point wrangles as a convient way or orienting geometry (the orient attribute is a quarternion). Unit quarternions (called versors) provide a convenient way to represent orientation or rotation of geometry in 3D.
Sir William Rowan Hamilton defined quaternions as an extension of complex numbers. A rotation can be defined as a vector4 (w + xi + yj + zk) instead of a 3x3 matrix (Euler).

For example:

http://deborahrfowler.com/HoudiniResources/WrangleNodeExampleVexFunctions.html
http://deborahrfowler.com/HoudiniResources/WrangleNodeExampleRandomRotate.html

Quarternions, in a simplified explanation, are a way of rotating an object and avoiding gimbal lock which occurs in Euler rotations.

Here is an excellent illustration of gimbal lock: https://www.youtube.com/watch?v=zc8b2Jo7mno&t=413s

Here are three videos explaining quaternions:
The top of the three videos listed is from 3Blue1Brown which has some really excellent videos on mathematical principles you may find very useful.

For example, this one on vectors.