sknano.core.geometric_regions.Parallelepiped¶
-
class
sknano.core.geometric_regions.
Parallelepiped
(o=None, u=None, v=None, w=None)[source][source]¶ Geometric3DRegion
for a parallelepiped.New in version 0.3.0.
Represents a parallelepiped with origin (ox,oy,oz) and direction vectors u=(ux,uy,uz), v=(vx,vy,vz), and w=(wx,wy,wz).
Parameters: o : array_like, optional
Parallelepiped origin. If None, it defaults to o=[0, 0, 0].
u, v, w : array_like, optional
Parallelepiped direction vectors stemming from origin
o
. If None, then the default values are u=[1, 0, 0], v=[1, 1, 0], and w=[0, 1, 1].Notes
Parallelepiped
represents the bounded region {o+λ1u+λ2v+λ3w∈R3|0≤λi≤1}, where u, v, and w have to be linearly independent.Calling
Parallelepiped
with no parameters is equivalent toParallelepiped
(o=[0, 0, 0], u=[1, 0, 0], v=[1, 1, 0], w=[0, 1, 1]).Attributes
center
Alias for centroid
.centroid
Parallelepiped centroid, (cx,cy,cz). fmtstr
Format string. measure
Alias for volume
, which is the measure of a 3D geometric region.o
3D point coordinates (ox,oy,oz) of origin. u
3D direction vector u=(ux,uy,uz), with origin o
v
3D direction vector v=(vx,vy,vz), with origin o
volume
Parallelepiped volume, V. w
3D direction vector w=(wx,wy,wz), with origin o
Methods
center_centroid
()Center centroid
on origin.contains
(point)Test region membership of point in Parallelepiped
.rotate
([angle, axis, anchor_point, ...])Rotate GeometricRegion
points
andvectors
.todict
()Returns a dict
of theParallelepiped
constructor parameters.translate
(t[, fix_anchor_points])Translate GeometricRegion
points
andvectors
byVector
t.