sknano.core.geometric_regions.Parallelepiped.contains

Parallelepiped.contains(point)[source][source]

Test region membership of point in Parallelepiped.

Parameters:

point : array_like

Returns:

bool

True if point is within Parallelepiped, False otherwise

Notes

A point \((p_x, p_y, p_z)\) is within the bounded region of a parallelepiped with origin \((o_x, o_y, o_z)\) and direction vectors \(\mathbf{u}=(u_x, u_y, u_z)\), \(\mathbf{v}=(v_x, v_y, v_z)\), and \(\mathbf{w}=(w_x, w_y, w_z)\) if the following is true:

\[0\le\frac{ v_z (w_x (p_y - o_y) + w_y (o_x - p_x)) + w_z (v_x (o_y - p_y) + v_y (p_x - o_x)) + o_z (v_y w_x - v_x w_y) + p_z (v_x w_y - v_y w_x)}{ u_z (v_x w_y - v_y w_x) + u_y (v_z w_x - v_x w_z) + u_x (v_y w_z - v_z w_y)}\le 1 \land\]\[0\le\frac{ u_z (w_x (p_y - o_y) + w_y (o_x - p_x)) + w_z (u_x (o_y - p_y) + u_y (p_x - o_x)) + o_z (u_y w_x - u_x w_y) + p_z (u_x w_y - u_y w_x)}{ u_z (v_y w_x - v_x w_y) + u_y (v_x w_z - v_z w_x) + u_x (v_z w_y - v_y w_z)}\le 1 \land\]\[0\le\frac{ u_z (v_x (p_y - o_y) + v_y (o_x - p_x)) + v_z (u_x (o_y - p_y) + u_y (p_x - o_x)) + o_z (u_y v_x - u_x v_y) + p_z (u_x v_y - u_y v_x)}{ u_z (v_x w_y - v_y w_x) + u_y (v_z w_x - v_x w_z) + u_x (v_y w_z - v_z w_y)}\le 1\]