mymesh.delaunay.Triangulate#
- mymesh.delaunay.Triangulate(NodeCoords, Constraints=None, method=None, tol=1e-08, steiner=0)[source]#
Generate a triangulation for a 2D set of points. This will be a strictly convex triangulation.
- Parameters:
NodeCoords (array_like) – Coordinates of nodes to be triangulated. This can be an (n,3) or (n,2) array_like, however if given as an (n,3), the third dimension is ignored.
Constraints (array_like, optional) – List of edge constraints that must be present in the final triangulation, by default None. Edge constraints should be specified by node indices, for example [[0, 1], [1,2], …]
method (str, optional) –
Triangulation method, by default ‘BowyerWatson’ if no constraints are provided and ‘Triangle’ if constraints are provided.
’BowyerWatson’ - Generate a Delaunay triangulation by the Bowyer-Watson algorithm (
BowyerWatson2d())’scipy’ - Use
scipy.spatial.Delaunay’Triangle’ - Use Jonathon Shewchuk’s Delaunay triangulator
- Returns:
T – Mesh object containing the triangulated mesh.
- Return type: