CircularArc

CircularArc(pointa, pointb, center, resolution=100, negative=False)

Create a circular arc defined by two endpoints and a center.

The number of segments composing the polyline is controlled by setting the object resolution.

Parameters
pointasequence

Position of the first end point.

pointbsequence

Position of the other end point.

centersequence

Center of the circle that defines the arc.

resolutionint, optional

The number of segments of the polyline that draws the arc. Resolution of 1 will just create a line.

negativebool, optional

By default the arc spans the shortest angular sector between pointa and pointb.

By setting this to True, the longest angular sector is used instead (i.e. the negative coterminal angle to the shortest one).

Returns
pyvista.PolyData

Circular arc mesh.

Examples

Create a quarter arc centered at the origin in the xy plane.

>>> import pyvista
>>> arc = pyvista.CircularArc([-1, 0, 0], [0, 1, 0], [0, 0, 0])
>>> pl = pyvista.Plotter()
>>> _ = pl.add_mesh(arc, color='k', line_width=10)
>>> _ = pl.show_bounds(location='all', font_size=30, use_2d=True)
>>> _ = pl.view_xy()
>>> pl.show()
../../../_images/pyvista-CircularArc-1_00_00.png