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:
  • center (array_like or Point) – 3-tuple of floats or an instance of the Point class specifying the center point coordinates (x,y,z) of the axis-aligned Ellipsoid with semi-axes lengths rx, ry, rz.
  • ry, rz (rx,) – Semi-axes lengths rx,ry,rz of axis-aligned Ellipsoid centered at center.

Notes

Ellipsoid represents the axis-aligned ellipsoid:

{{x,y,z}R3|(xcxrx)2+(ycyry)2+(zczrz)21}

Calling Ellipsoid with no parameters is equivalent to Ellipsoid(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 in Ellipsoid.
get_points() Return list of points from GeometricRegion.points and GeometricRegion.vectors
rotate(**kwargs) Rotate GeometricRegion points and vectors.
todict() Returns a dict of the Ellipsoid constructor parameters.
translate(t[, fix_anchor_points]) Translate GeometricRegion points and vectors by Vector 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 in Ellipsoid.
todict() Returns a dict of the Ellipsoid constructor parameters.

Attributes Documentation

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 Documentation

contains(point)[source] [edit on github][source]

Test region membership of point in Ellipsoid.

Parameters:point (array_like) –
Returns:True if point is within Ellipsoid, False otherwise
Return 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:

(pxcxrx)2+(pycyry)2+(pzczrz)21
todict()[source] [edit on github][source]

Returns a dict of the Ellipsoid constructor parameters.