pyvista.Pyramid#
- Pyramid(points=None)[source]#
Create a pyramid defined by 5 points.
- Parameters:
- pointsarray_like[
float
],optional
Points of the pyramid. Points are ordered such that the first four points are the four counterclockwise points on the quadrilateral face, and the last point is the apex.
Defaults to pyramid in example.
- pointsarray_like[
- Returns:
pyvista.UnstructuredGrid
Unstructured grid containing a single pyramid cell.
Examples
>>> import pyvista as pv >>> pointa = [1.0, 1.0, 0.0] >>> pointb = [-1.0, 1.0, 0.0] >>> pointc = [-1.0, -1.0, 0.0] >>> pointd = [1.0, -1.0, 0.0] >>> pointe = [0.0, 0.0, 1.608] >>> pyramid = pv.Pyramid([pointa, pointb, pointc, pointd, pointe]) >>> pyramid.plot(show_edges=True, line_width=5)