Ellipse

Contents

Ellipse#

Ellipse(
semi_major_axis: float = 0.5,
semi_minor_axis: float = 0.2,
resolution: int = 100,
) PolyData[source]#

Create a single ellipse defined by the Semi-major and Semi-minor axes in the XY plane.

Parameters:
semi_major_axisfloat, default: 0.5

Semi-major axis of ellipse.

semi_minor_axisfloat, default: 0.2

Semi-minor axis of ellipse.

resolutionint, default: 100

Number of points on the ellipse.

Returns:
pyvista.PolyData

Ellipse mesh.

Notes

Changed in version 0.38.0: Prior to version 0.38, this method had incorrect results, producing inconsistent edge lengths and a duplicated point which is now fixed.

Examples

>>> import pyvista as pv
>>> ellipse = pv.Ellipse(semi_major_axis=8, semi_minor_axis=4)
>>> ellipse.plot(show_edges=True, line_width=5)
../../../_images/pyvista-Ellipse-dacc4d7692c8520f_00_00.png