q_rotation#

static GeometryOperators.q_rotation(v, q)#

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:
vList

List of [v1, v2, v3] coordinates for the vector.

qList

List of [q1, q2, q3, q4] coordinates for the quaternion.

Returns:
List

List of [w1, w2, w3] coordinates for the result vector w.