quaternion_multiply

compas.geometry.quaternion_multiply(r, q)[source]

Multiplies two quaternions.

Parameters
Returns

[float, float, float, float] – Quaternion p=rq as a list of four real values [pw, px, py, pz].

Notes

Multiplication of two quaternions p=rq can be interpreted as applying rotation r to an orientation q, provided that both r and q are unit-length. The result is also unit-length. Multiplication of quaternions is not commutative!

References