q_prod#

static GeometryOperators.q_prod(p, q)[source]#

Evaluate the product of two quaternions, p and q, defined as: p = p0 + p’ = p0 + ip1 + jp2 + kp3. q = q0 + q’ = q0 + iq1 + jq2 + kq3. r = pq = p0q0 - p’ • q’ + p0q’ + q0p’ + p’ x q’.

Parameters:
pList

List of [p1, p2, p3, p4] coordinates for quaternion p.

qList

List of [p1, p2, p3, p4] coordinates for quaternion q.

Returns:
List

List of [r1, r2, r3, r4] coordinates for the result quaternion.