Triangle

Triangle(points=None)

Create a triangle defined by 3 points.

Parameters
pointssequence, optional

Points of the triangle. Defaults to a right isosceles triangle (see example).

Returns
pyvista.PolyData

Triangle mesh.

Examples

>>> import pyvista
>>> pointa = [0, 0, 0]
>>> pointb = [1, 0, 0]
>>> pointc = [0.5, 0.707, 0]
>>> triangle = pyvista.Triangle([pointa, pointb, pointc])
>>> triangle.plot(show_edges=True, line_width=5)
../../../_images/pyvista-Triangle-1_00_00.png