Tetrahedron#
- Tetrahedron() UnstructuredGrid[source]#
Create a
pyvista.UnstructuredGridcontaining a single Tetrahedron.This cell corresponds to the
pyvista.CellType.TETRAcell type.- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing a single Tetrahedron.
Examples#
Download Python source code | Download Jupyter notebook
Create and plot a single tetrahedron.
>>> from pyvista import examples
>>> grid = examples.cells.Tetrahedron()
>>> examples.plot_cell(grid)
List the grid’s cells.
>>> grid.cells
array([4, 0, 1, 2, 3])
List the grid’s points.
>>> grid.points
pyvista_ndarray([[ 0.35355339, -0.35355339, -0.35355339],
[ 0.35355339, 0.35355339, 0.35355339],
[-0.35355339, 0.35355339, -0.35355339],
[-0.35355339, -0.35355339, 0.35355339]])
>>> grid.celltypes # same as pyvista.CellType.TETRA
array([10], dtype=uint8)