PointSet.delaunay_3d#
- PointSet.delaunay_3d( )[source]#
Construct a 3D Delaunay triangulation of the mesh.
This filter can be used to generate a 3D tetrahedral mesh from a surface or scattered points. If you want to create a surface from a point cloud, see
pyvista.PolyDataFilters.reconstruct_surface().- Parameters:
- alpha
float, default: 0.0 Distance value to control output of this filter. For a non-zero alpha value, only vertices, edges, faces, or tetrahedra contained within the circumsphere (of radius alpha) will be output. Otherwise, only tetrahedra will be output.
- tol
float, default: 0.001 Tolerance to control discarding of closely spaced points. This tolerance is specified as a fraction of the diagonal length of the bounding box of the points.
- offset
float, default: 2.5 Multiplier to control the size of the initial, bounding Delaunay triangulation.
- progress_barbool, default:
False Display a progress bar to indicate progress.
- alpha
- Returns:
pyvista.UnstructuredGridUnstructuredGrid containing the Delaunay triangulation.
Examples#
Download Python source code | Download Jupyter notebook
Generate a 3D Delaunay triangulation of a surface mesh of a sphere and plot the interior edges generated.
>>> import pyvista as pv
>>> sphere = pv.Sphere(theta_resolution=5, phi_resolution=5)
>>> grid = sphere.delaunay_3d()
>>> edges = grid.extract_all_edges()
>>> edges.plot(line_width=5, color='k')
See Wrap a Point Cloud in a Convex Hull for more examples using this filter.