Next example shows how to rotate quaternion by axis and angle with vex:
Add random quaternion rotation by axis and blend with existing @orient
I’m using simple random weight control for each axis here. This is a straightforward approach for understanding.
However, if you plan to use this for animation, it can cause problems when blending two quaternions.
In this case, it’s better to use the slerp() function and a weight mask for blending the quaternions by axis.