sknano.core.geometric_regions.Parallelepiped¶
-
class
sknano.core.geometric_regions.Parallelepiped(o=None, u=None, v=None, w=None)[source][source]¶ Geometric3DRegionfor 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)\).
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
Parallelepipedrepresents 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
Parallelepipedwith no parameters is equivalent toParallelepiped(o=[0, 0, 0], u=[1, 0, 0], v=[1, 1, 0], w=[0, 1, 1]).Attributes
centerAlias for centroid.centroidParallelepiped centroid, \((c_x, c_y, c_z)\). fmtstrFormat string. measureAlias for volume, which is the measure of a 3D geometric region.o3D point coordinates \((o_x, o_y, o_z)\) of origin. u3D direction vector \(\mathbf{u}=(u_x, u_y, u_z)\), with origin ov3D direction vector \(\mathbf{v}=(v_x, v_y, v_z)\), with origin ovolumeParallelepiped volume, \(V\). w3D direction vector \(\mathbf{w}=(w_x, w_y, w_z)\), with origin oMethods
center_centroid()Center centroidon origin.contains(point)Test region membership of point in Parallelepiped.rotate([angle, axis, anchor_point, ...])Rotate GeometricRegionpointsandvectors.todict()Returns a dictof theParallelepipedconstructor parameters.translate(t[, fix_anchor_points])Translate GeometricRegionpointsandvectorsbyVectort.