Ellipsoid¶
-
class
sknano.core.geometric_regions.
Ellipsoid
(center=None, rx=1, ry=1, rz=1)[source] [edit on github][source]¶ Bases:
sknano.core.geometric_regions.Geometric3DRegion
Geometric3DRegion
for an ellipsoid.New in version 0.3.0.
Represents an axis-aligned ellipsoid centered at the point (cx,cy,cz) with semi-axes lengths rx,ry,rz.
Parameters: Notes
Ellipsoid
represents the axis-aligned ellipsoid:{{x,y,z}∈R3|(x−cxrx)2+(y−cyry)2+(z−czrz)2≤1}Calling
Ellipsoid
with no parameters is equivalent toEllipsoid
(center=[0, 0, 0], rx=1, ry=1, rz=1)
.Attributes
bounding_box
Bounding Cuboid
.center
Ellipsoid
center point (cx,cy,cz).centroid
Alias for center
.fmtstr
Format string. measure
Alias for volume
, which is the measure of a 3D geometric region.ndim
Return the dimensions. pmax
Point
at maximum extent.pmin
Point
at minimum extent.rx
Length of semi-axis rx. ry
Length of semi-axis ry. rz
Length of semi-axis rz. volume
Ellipsoid
volume, V=43πrxryrz.Methods
center_centroid
()Center centroid
on origin.contains
(point)Test region membership of point
inEllipsoid
.get_points
()Return list of points from GeometricRegion.points
andGeometricRegion.vectors
rotate
(**kwargs)Rotate GeometricRegion
points
andvectors
.todict
()Returns a dict
of theEllipsoid
constructor parameters.translate
(t[, fix_anchor_points])Translate GeometricRegion
points
andvectors
byVector
t
.Attributes Summary
center
Ellipsoid
center point (cx,cy,cz).centroid
Alias for center
.rx
Length of semi-axis rx. ry
Length of semi-axis ry. rz
Length of semi-axis rz. volume
Ellipsoid
volume, V=43πrxryrz.Methods Summary
contains
(point)Test region membership of point
inEllipsoid
.todict
()Returns a dict
of theEllipsoid
constructor parameters.Attributes Documentation
-
rx
¶ Length of semi-axis rx.
-
ry
¶ Length of semi-axis ry.
-
rz
¶ Length of semi-axis rz.
Methods Documentation
-
contains
(point)[source] [edit on github][source]¶ Test region membership of
point
inEllipsoid
.Parameters: point (array_like) – Returns: True
ifpoint
is withinEllipsoid
,False
otherwiseReturn type: bool
Notes
A
point
(px,py,pz) is within the bounded region of an ellipsoid with center (cx,cy,cz) and semi-axes lengths rx,ry,rz if the following is true:(px−cxrx)2+(py−cyry)2+(pz−czrz)2≤1
-