Ellipsoid¶
-
class
sisl.shape.Ellipsoid(x, y, z, center=None)[source]¶ 3D Ellipsoid shape
Parameters: x : float
the radius along x-direction
y : float
the radius along y-direction
z : int
the radius along z-direction
Examples
>>> xyz = [0, 2, 0] >>> shape = Ellipsoid(2, 2.2, 2, [0] * 3) >>> shape.within(xyz) array([ True], dtype=bool)
Attributes
centerThe geometric center of the shape displacementReturn the displacement vector of the Ellipsoid origoThe geometric origo of the shape radiusReturn the radius of the Ellipsoid volumeReturn the volume of the shape Methods
__init__(x, y, z[, center])enlarge(length)Return a new Shape with an increased size length expand(length)Return a new shape with a larger corresponding to length iwithin(other)Return indices of the points that are within the shape set_center(center)Change the center of the object within(other)Return whether the points are within the shape -
center¶ The geometric center of the shape
-
displacement¶ Return the displacement vector of the Ellipsoid
-
enlarge(length)¶ Return a new Shape with an increased size length
-
origo¶ The geometric origo of the shape
An origo should always be the lowest left coordinate of the shape.
Notes
Not all shapes have an origo. For instance a sphere only have a center, but an origo cannot be defined.
-
radius¶ Return the radius of the Ellipsoid
-
volume¶ Return the volume of the shape
-