- PolyDataFilters.delaunay_2d(tol=1e-05, alpha=0.0, offset=1.0, bound=False, inplace=False, edge_source=None, progress_bar=False)#
Apply a 2D Delaunay filter along the best fitting plane.
This filter can be used to generate a 2d surface from a set of points on a plane. If you want to create a surface from a point cloud, see
Specify a 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. Defaults to
Specify alpha (or distance) value to control output of this filter. For a non-zero alpha value, only edges or triangles contained within a sphere centered at mesh vertices will be output. Otherwise, only triangles will be output. Defaults to
Specify a multiplier to control the size of the initial, bounding Delaunay triangulation. Defaults to
Boolean controls whether bounding triangulation points and associated triangles are included in the output. These are introduced as an initial triangulation to begin the triangulation process. This feature is nice for debugging output. Default
True, overwrite this mesh with the triangulated mesh. Default
Specify the source object used to specify constrained edges and loops. If set, and lines/polygons are defined, a constrained triangulation is created. The lines/polygons are assumed to reference points in the input point set (i.e. point ids are identical in the input and source).
Display a progress bar to indicate progress. Default
Mesh from the 2D delaunay filter.
First, generate 30 points on circle and plot them.
>>> import pyvista >>> points = pyvista.Polygon(n_sides=30).points >>> circle = pyvista.PolyData(points) >>> circle.plot(show_edges=True, point_size=15)
delaunay_2d()to fill the interior of the circle.
>>> filled_circle = circle.delaunay_2d() >>> filled_circle.plot(show_edges=True, line_width=5)
See Create Triangulated Surface for more examples using this filter.