q_rotation#
- static GeometryOperators.q_rotation(v, q)[source]#
Evaluate the rotation of a vector, defined by a quaternion. Evaluated as:
"q = q0 + q' = q0 + iq1 + jq2 + kq3"
,"w = qvq* = (q0^2 - |q'|^2)v + 2(q' • v)q' + 2q0(q' x v)"
.- Parameters:
- v
List
List of
[v1, v2, v3]
coordinates for the vector.- q
List
List of
[q1, q2, q3, q4]
coordinates for the quaternion.
- v
- Returns:
List
List of
[w1, w2, w3]
coordinates for the result vectorw
.