sknano.core.geometric_regions.Ellipse¶
-
class
sknano.core.geometric_regions.
Ellipse
(center=None, rx=1, ry=1)[source][source]¶ Geometric2DRegion
for an ellipse.New in version 0.3.0.
Represents an axis-aligned ellipse centered at (cx,cy) with semi-axes lengths rx,ry.
Parameters: center : array_like, optional
Center of axis-aligned ellipse with semi-axes lengths rx,ry
rx, ry : float
Lengths of semi-axes rx,ry
Notes
Ellipse
represents the axis-aligned ellipsoid:{{x,y,z}∈R3|(x−cxrx)2+(y−cyry)2+(z−czrz)2≤1}Calling
Ellipse
with no parameters is equivalent toEllipse
(center=[0, 0], rx=1, ry=1).Attributes
area
Ellipse
area, A=πrxry.center
Ellipse
center point (cx,cy).centroid
Alias for center
.fmtstr
Format string. measure
Alias for area
, which is the measure of a 2D geometric region.rx
Length of semi-axis rx. ry
Length of semi-axis ry. Methods
center_centroid
()Center centroid
on origin.contains
(point)Test region membership of point in Ellipse
.rotate
([angle, axis, anchor_point, ...])Rotate GeometricRegion
points
andvectors
.todict
()Returns a dict
of theEllipse
constructor parameters.translate
(t[, fix_anchor_points])Translate GeometricRegion
points
andvectors
byVector
t.