Skip to content

ellipse

twod.ellipse

an ellipse for humans™

Classes

Ellipse(x: float = 0.0, y: float = 0.0, minor_axis: int = 0, major_axis: int = 0) dataclass

Bases: Point

Attributes
e property

The eccentricity of this ellipse expressed as a float.

focus1 property

The first focus of the ellipse.

focus2 property

The second focus of the ellipse.

vertices property

A list of Points that are major_axis distance from the center of the ellipse on the x-axis.

co_vertices property

A list of Points that are minor_axis distance from the center of the ellipse on the y-axis.

is_circle property

Returns True if this ellipse is also a circle.