sknano.core.geometric_regions.Cube¶
-
class
sknano.core.geometric_regions.Cube(center=None, a=1)[source][source]¶ Geometric3DRegionfor a cube.New in version 0.3.0.
Cuberepresents the region \(\left\{\{c_i\pm\frac{a}{2}\}|a>0\forall i\in\{x,y,z\}\right\}\).Parameters: center : array_like, optional
The \((x,y,z)\) coordinate of the axis-aligned cube center \((c_x, c_y, c_z)\).
a : float, optional
Side length \(a\) of axis-aligned cube.
Notes
Calling
Cubewith no parameters is equivalent toCube(center=[0, 0, 0], a=1).Attributes
aSide length \(a\) of the axis-aligned cube. centerCenter point \((c_x, c_y, c_z)\) of axis-aligned cube. centroidAlias for center.fmtstrFormat string. measureAlias for volume, which is the measure of a 3D geometric region.volumeCubevolume, \(V=a^3\).Methods
center_centroid()Center centroidon origin.contains(point)Test region membership of point in Cube.rotate([angle, axis, anchor_point, ...])Rotate GeometricRegionpointsandvectors.todict()Returns a dictof theCubeconstructor parameters.translate(t[, fix_anchor_points])Translate GeometricRegionpointsandvectorsbyVectort.