delaunay_3d

UniformGridFilters.delaunay_3d(alpha=0, tol=0.001, offset=2.5, progress_bar=False)

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.DataSetFilters.reconstruct_surface().

Parameters
alphafloat, optional

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, optional

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, optional

Multiplier to control the size of the initial, bounding Delaunay triangulation.

progress_barbool, optional

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
>>> sphere = pyvista.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-UniformGridFilters-delaunay_3d-1_00_00.png