colour.is_within_mesh_volume#
- colour.is_within_mesh_volume(points: ArrayLike, mesh: ArrayLike, tolerance: float = 100 * EPSILON) NDArrayFloat[source]#
Determine whether the specified points are within the volume defined by a mesh using Delaunay triangulation.
- Parameters:
- Returns:
Boolean array indicating whether specified points are within specified mesh volume.
- Return type:
Examples
>>> mesh = np.array( ... [ ... [-1.0, -1.0, 1.0], ... [1.0, -1.0, 1.0], ... [1.0, -1.0, -1.0], ... [-1.0, -1.0, -1.0], ... [0.0, 1.0, 0.0], ... ] ... ) >>> is_within_mesh_volume(np.array([0.0005, 0.0031, 0.0010]), mesh) array(True, dtype=bool) >>> a = np.array([[0.0005, 0.0031, 0.0010], [0.3205, 0.4131, 0.5100]]) >>> is_within_mesh_volume(a, mesh) array([ True, False], dtype=bool)