/* Produce a quaternion from an axis-angle representation.*/ function quat_from_axis(theta: number, x: number, y: number, z: number) { const halfcos = Math.cos(theta * 0.5); const halfsin = Math.sin(theta * 0.5); return new Quaternion( halfcos, axis[0] * halfsin, axis[1] * halfsin, axis[2] * halfsin, ); }
A unit quaternion represents a rotation in R³.
A quaternion represents the quotient of two vectors in R³. That's what Hamilton had in mind.
A unit quaternion represents a rotation in R³.
A quaternion represents the quotient of two vectors in R³. That's what Hamilton had in mind.