Renders the edges of the Delaunay triangulation to an SVG path string.
Renders the edges of the Delaunay triangulation to the specified context. The specified context must implement the context.moveTo and context.lineTo methods from the CanvasPathMethods API.
Renders the convex hull of the Delaunay triangulation to an SVG path string.
Renders the convex hull of the Delaunay triangulation to the specified context. The specified context must implement the context.moveTo and context.lineTo methods from the CanvasPathMethods API.
Renders the input points of the Delaunay triangulation to an SVG path string as circles with radius 2.
Renders the input points of the Delaunay triangulation to an SVG path string as circles with the specified radius.
Renders the input points of the Delaunay triangulation to the specified context as circles with the specified radius. If radius is not specified, it defaults to 2. The specified context must implement the context.moveTo and context.arc methods from the CanvasPathMethods API.
Optional
radius: numberRenders triangle i of the Delaunay triangulation to an SVG path string.
Renders triangle i of the Delaunay triangulation to the specified context. The specified context must implement the context.moveTo, context.lineTo and context.closePath methods from the CanvasPathMethods API.
Returns the Voronoi diagram for the associated points. When rendering, the diagram will be clipped to the specified bounds = [xmin, ymin, xmax, ymax]. If bounds is not specified, it defaults to [0, 0, 960, 500]. See To Infinity and Back Again for an interactive explanation of Voronoi cell clipping.
Optional
bounds: BoundsStatic
fromReturns the Delaunay triangulation for the given array or iterable of points where each point is an array in the form: [x, y].
Returns the Delaunay triangulation for the given array or iterable of points. Otherwise, the getX and getY functions are invoked for each point in order, and must return the respective x- and y-coordinate for each point. If that is specified, the functions getX and getY are invoked with that as this. (See Array.from for reference.)
Optional
that: anyThe halfedge indices as an Int32Array [j0, j1, ...]. For each index 0 <= i < halfedges.length, there is a halfedge from triangle vertex j = halfedges[i] to triangle vertex i.
An Int32Array of point indexes that form the convex hull in counterclockwise order. If the points are collinear, returns them ordered.
The incoming halfedge indexes as a Int32Array [e0, e1, e2, ...]. For each point i, inedges[i] is the halfedge index e of an incoming halfedge. For coincident points, the halfedge index is -1; for points on the convex hull, the incoming halfedge is on the convex hull; for other points, the choice of incoming halfedge is arbitrary.
The coordinates of the points as an array [x0, y0, x1, y1, ...]. Typically, this is a Float64Array, however you can use any array-like type in the constructor.
The triangle vertex indices as an Uint32Array [i0, j0, k0, i1, j1, k1, ...]. Each contiguous triplet of indices i, j, k forms a counterclockwise triangle. The coordinates of the triangle's points can be found by going through 'points'.
Delaunay triangulation