skrobot.coordinates.math.triple_product

skrobot.coordinates.math.triple_product(a, b, c)[source]

Returns Triple Product

See https://en.wikipedia.org/wiki/Triple_product.

Geometrically, the scalar triple product

\(a\cdot(b \times c)\)

is the (signed) volume of the parallelepiped defined by the three vectors given.

Parameters:
Returns:

triple product – calculated triple product

Return type:

float

Examples

>>> from skrobot.math import triple_product
>>> triple_product([1, 1, 1], [1, 1, 1], [1, 1, 1])
0
>>> triple_product([1, 0, 0], [0, 1, 0], [0, 0, 1])
1