sknano.core.geometric_regions.Sphere.contains

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

Test region membership of point in Sphere.

Parameters:

point : array_like

Returns:

bool

True if point is within Sphere, False otherwise.

Notes

A point \((p_x, p_y, p_z)\) is within the bounded region of a sphere with center \((h, k, l)\) and radius \(r\) if the following is true:

\[(p_x - h)^2 + (p_y - k)^2 + (p_z - l)^2 \le r^2\]