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.Geometric3DRegionGeometric3DRegionfor 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
Ellipsoidrepresents the axis-aligned ellipsoid:{{x,y,z}∈R3|(x−cxrx)2+(y−cyry)2+(z−czrz)2≤1}Calling
Ellipsoidwith no parameters is equivalent toEllipsoid(center=[0, 0, 0], rx=1, ry=1, rz=1).Attributes
bounding_boxBounding Cuboid.centerEllipsoidcenter point (cx,cy,cz).centroidAlias for center.fmtstrFormat string. measureAlias for volume, which is the measure of a 3D geometric region.ndimReturn the dimensions. pmaxPointat maximum extent.pminPointat minimum extent.rxLength of semi-axis rx. ryLength of semi-axis ry. rzLength of semi-axis rz. volumeEllipsoidvolume, V=43πrxryrz.Methods
center_centroid()Center centroidon origin.contains(point)Test region membership of pointinEllipsoid.get_points()Return list of points from GeometricRegion.pointsandGeometricRegion.vectorsrotate(**kwargs)Rotate GeometricRegionpointsandvectors.todict()Returns a dictof theEllipsoidconstructor parameters.translate(t[, fix_anchor_points])Translate GeometricRegionpointsandvectorsbyVectort.Attributes Summary
centerEllipsoidcenter point (cx,cy,cz).centroidAlias for center.rxLength of semi-axis rx. ryLength of semi-axis ry. rzLength of semi-axis rz. volumeEllipsoidvolume, V=43πrxryrz.Methods Summary
contains(point)Test region membership of pointinEllipsoid.todict()Returns a dictof theEllipsoidconstructor 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
pointinEllipsoid.Parameters: point (array_like) – Returns: Trueifpointis withinEllipsoid,FalseotherwiseReturn type: boolNotes
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
-