Sphere¶
-
class
sisl.shape.Sphere(radius, center=None)[source]¶ 3D Sphere
- Parameters
- rfloat
radius of the sphere
Attributes
The geometric center of the shape
Return the radius of the Sphere
Methods
__init__(self, radius[, center])Initialize self.
copy(self)expand(self, radius)Expand sphere by a constant radius
scale(self, scale)Return a new sphere with a larger radius
set_center(self, center)Change the center of the object
toCuboid(self)Return a cuboid with side lengths equal to the diameter of each ellipsoid vectors
toEllipsoid(self)Convert this sphere into an ellipsoid
toSphere(self)Return a copy of it-self
volume(self)Return the volume of the sphere
within(self, other)Return
Trueif other is fully within selfwithin_index(self, other)Return indices of the points that are within the shape
-
property
center¶ The geometric center of the shape
-
expand(self, radius)[source]¶ Expand sphere by a constant radius
- Parameters
- radiusfloat
the extension in Ang per ellipsoid radial vector
-
property
radius¶ Return the radius of the Sphere
-
scale(self, scale)[source]¶ Return a new sphere with a larger radius
- Parameters
- scalefloat
the scale parameter for the radius
-
set_center(self, center)¶ Change the center of the object
-
toCuboid(self)¶ Return a cuboid with side lengths equal to the diameter of each ellipsoid vectors
-
within(self, other)¶ Return
Trueif other is fully within selfIf other is an array, an array will be returned for each of these.
- Parameters
- otherarray_like
the array/object that is checked for containment
-
within_index(self, other)¶ Return indices of the points that are within the shape