quaternion_multiply
- compas.geometry.quaternion_multiply(r, q)[source]
Multiplies two quaternions.
- Parameters:
- r[float, float, float, float] |
compas.geometry.Quaternion
Quaternion or sequence of four floats
[w, x, y, z]
.- q[float, float, float, float] |
compas.geometry.Quaternion
Quaternion or sequence of four floats
[w, x, y, z]
.
- r[float, float, float, float] |
- Returns:
- [float, float, float, float]
Quaternion
as a list of four real values[pw, px, py, pz]
.
See also
Notes
Multiplication of two quaternions
can be interpreted as applying rotation to an orientation , provided that both and are unit-length. The result is also unit-length. Multiplication of quaternions is not commutative!References
Quaternion: http://mathworld.wolfram.com/Quaternion.html