pyvista.PointSet.delaunay_3d

pyvista.PointSet.delaunay_3d#

PointSet.delaunay_3d(alpha=0.0, tol=0.001, offset=2.5, progress_bar: bool = False)[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:
alphafloat, 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.

tolfloat, 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.

offsetfloat, 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.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing the Delaunay triangulation.

Examples

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')
../../../_images/pyvista-PointSet-delaunay_3d-1_00_00.png