Rectangle

Rectangle(points=None)

Create a rectangle defined by 4 points.

Parameters
pointssequence, optional

Points of the rectangle. Defaults to a simple example.

Returns
pyvista.PolyData

Rectangle mesh.

Examples

>>> import pyvista
>>> pointa = [1.0, 0.0, 0.0]
>>> pointb = [1.0, 1.0, 0.0]
>>> pointc = [0.0, 1.0, 0.0]
>>> pointd = [0.0, 0.0, 0.0]
>>> rectangle = pyvista.Rectangle([pointa, pointb, pointc, pointd])
>>> rectangle.plot(show_edges=True, line_width=5)
../../../_images/pyvista-Rectangle-1_00_00.png