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 \((o_x, o_y, o_z)\) and direction vectors \(\mathbf{u}=(u_x, u_y, u_z)\), \(\mathbf{v}=(v_x, v_y, v_z)\), and \(\mathbf{w}=(w_x, w_y, w_z)\).


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].


Parallelepiped represents the bounded region \(\left\{o+\lambda_1\mathbf{u}+\lambda_2\mathbf{v}+ \lambda_3\mathbf{w}\in R^3|0\le\lambda_i\le 1\right\}\), where \(\mathbf{u}\), \(\mathbf{v}\), and \(\mathbf{w}\) have to be linearly independent.

Calling Parallelepiped with no parameters is equivalent to Parallelepiped(o=[0, 0, 0], u=[1, 0, 0], v=[1, 1, 0], w=[0, 1, 1]).


center Alias for centroid.
centroid Parallelepiped centroid, \((c_x, c_y, c_z)\).
fmtstr Format string.
measure Alias for volume, which is the measure of a 3D geometric region.
o 3D point coordinates \((o_x, o_y, o_z)\) of origin.
u 3D direction vector \(\mathbf{u}=(u_x, u_y, u_z)\), with origin o
v 3D direction vector \(\mathbf{v}=(v_x, v_y, v_z)\), with origin o
volume Parallelepiped volume, \(V\).
w 3D direction vector \(\mathbf{w}=(w_x, w_y, w_z)\), with origin o


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