Loading [MathJax]/jax/output/HTML-CSS/jax.js

sknano.core.geometric_regions.Cuboid

class sknano.core.geometric_regions.Cuboid(pmin=None, pmax=None, xmin=0, ymin=0, zmin=0, xmax=1, ymax=1, zmax=1)[source][source]

Geometric3DRegion for a cuboid.

New in version 0.3.0.

Represents an axis-aligned cuboid with lower corner pmin=(xmin,ymin,zmin) and upper corner pmax=(xmax,ymax,zmax).

Parameters:

pmin, pmax : array_like, optional

The minimum and maximum 3D point coordinates of the axis-aligned cuboid from pmin=[xmin, ymin, zmin] to pmax=[xmax, ymax, zmax].

xmin, ymin, zmin : float, optional

The minimum (x,y,z) coordinates of the axis-aligned cuboid.

xmax, ymax, zmax : float, optional

The maximum (x,y,z) coordinates of the axis-aligned cuboid.

Notes

Cuboid represents the region {{x,y,z}|xminxxmaxyminyymaxzminzzmax}

Calling Cuboid with no parameters is equivalent to Cuboid(pmin=[0, 0, 0], pmax=[1, 1, 1]).

Attributes

a Distance between xmaxxmin.
b Distance between ymaxymin.
c Distance between zmaxzmin.
center Alias for centroid.
centroid Cuboid centroid, (cx,cy,cz).
fmtstr Format string.
measure Alias for volume, which is the measure of a 3D geometric region.
pmax 3D Point at (xmax, ymax, zmax)
pmin 3D Point at (xmin, ymin, zmin)
volume Cuboid volume, V=abc.
xmax xmax coordinate.
xmin xmin coordinate.
ymax ymax coordinate.
ymin ymin coordinate.
zmax zmax coordinate.
zmin zmin coordinate.

Methods

center_centroid() Center centroid on origin.
contains(point) Test region membership of point in Cuboid.
rotate(**kwargs)
todict() Returns a dict of the Cuboid constructor parameters.
translate(t[, fix_anchor_points]) Translate GeometricRegion points and vectors by Vector t.