sknano.core.geometric_regions.Cube¶
-
class
sknano.core.geometric_regions.
Cube
(center=None, a=1)[source][source]¶ Geometric3DRegion
for a cube.New in version 0.3.0.
Cube
represents the region {{ci±a2}|a>0∀i∈{x,y,z}}.Parameters: center : array_like, optional
The (x,y,z) coordinate of the axis-aligned cube center (cx,cy,cz).
a : float, optional
Side length a of axis-aligned cube.
Notes
Calling
Cube
with no parameters is equivalent toCube
(center=[0, 0, 0], a=1).Attributes
a
Side length a of the axis-aligned cube. center
Center point (cx,cy,cz) of axis-aligned cube. centroid
Alias for center
.fmtstr
Format string. measure
Alias for volume
, which is the measure of a 3D geometric region.volume
Cube
volume, V=a3.Methods
center_centroid
()Center centroid
on origin.contains
(point)Test region membership of point in Cube
.rotate
([angle, axis, anchor_point, ...])Rotate GeometricRegion
points
andvectors
.todict
()Returns a dict
of theCube
constructor parameters.translate
(t[, fix_anchor_points])Translate GeometricRegion
points
andvectors
byVector
t.