pyvista.Triangle#

Triangle(points=None)[source]#

Create a triangle defined by 3 points.

Parameters:
pointsarray_like[float], optional

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

Returns:
pyvista.PolyData

Triangle mesh.

Examples

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