quaternion_multiply
-
compas.geometry.quaternion_multiply(r, q)[source] Multiplies two quaternions.
- Parameters
r (list) – Quaternion as a list of four real values
[rw, rx, ry, rz].q (list) – Quaternion as a list of four real values
[qw, qx, qy, qz].
- Returns
list – 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