microstructpy.geometry.n_box module¶
N-Dimensional Box
This module contains the NBox class.
-
class
microstructpy.geometry.n_box.
NBox
(**kwargs)[source]¶ Bases:
object
N-dimensional box
This class contains a generic, n-dimensinoal box.
Parameters: - side_lengths (list, optional) – Side lengths.
- center (list, optional) – Center of box.
- corner (list, optional) – Bottom-left corner.
- bounds (list, optional) – Bounds of box. Expected in the form [(xmin, xmax), (ymin, ymax), …].
- limits – Alias for bounds.
- matrix (nxn list, optional) – Rotation matrix
-
within
(points)[source]¶ Test if points are within n-box.
This function tests whether a point or set of points are within the n-box. For the set of points, a list of booleans is returned to indicate which points are within the n-box.
Parameters: points (list) – Point or list of points. Returns: Flags set to True for points in geometry. Return type: bool or numpy.ndarray
-
bounds
¶ (lower, upper) bounds of the box
Type: float
-
corner
¶ bottom-left corner
Type: list
-
limits
¶ (lower, upper) bounds of the box
Type: list
-
n_vol
¶ area, volume of n-box
Type: float
-
sample_limits
¶ (lower, upper) bounds of the sampling region of the box
Type: list