pyvista.Tetrahedron

Contents

pyvista.Tetrahedron#

Tetrahedron(
radius: float = 1.0,
center: VectorLike[float] = (0.0, 0.0, 0.0),
) PolyData[source]#

Create a tetrahedron of a given size.

A tetrahedron is composed of four congruent equilateral triangles.

Parameters:
radiusfloat, default: 1.0

The radius of the circumscribed sphere for the tetrahedron.

centersequence[float], default: (0.0, 0.0, 0.0)

Three-length sequence defining the center of the tetrahedron.

Returns:
pyvista.PolyData

Mesh for the tetrahedron. Cell scalars are defined that assign integer labels to each face (with array name "FaceIndex").

Examples

Create and plot a tetrahedron.

>>> import pyvista as pv
>>> tetra = pv.Tetrahedron()
>>> tetra.plot(categories=True)
../../../_images/pyvista-Tetrahedron-1_00_00.png

See Platonic Solids for more examples using this filter.