![]() |
VOOZH | about |
D3.js is a strong JavaScript framework for data visualization, and one of its modules, Delaunay, supports Delaunay triangulation. The Delaunay.trianglePolygons() Method returns an iterable over the polygons for each triangle, in order.
Delaunay.trianglePolygons()
This method takes no parameters.
This method returns an Iterable over the polygons.
Example 1: The below code example shows the use of the Delaunay.trianglePolygons() method.
Output:
👁 resize-1709472822368222932Screenshot202403031859001-(1)
Example 2: The below code uses the d3.Delaunay.trianglePolygons() method to render the individual triangles of a Delaunay triangulation on a canvas.
Output: