VOOZH about

URL: https://www.geeksforgeeks.org/javascript/d3-js-delaunay-halfedges-property/

⇱ D3.js Delaunay.halfedges Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

D3.js Delaunay.halfedges Property

Last Updated : 28 Apr, 2025

The Delaunay.halfedges property returns the half-edge indices as an Int32Array [j0, j1, …]. For every index value between 0 and the length of the half-edges array (exclusive), there is a connection from a vertex of a triangle to another vertex.

Syntax:

delaunay.halfedges

Parameters:

It takes nothing as the parameter.

Return Value:

This property returns an array pointing to the indices of the half-edges.

Example 1: The below code example shows the use of the d3.delaunay.halfedges property.

Output:

👁 D3SS

Example 2: The below code uses the d3.Delaunay.halfedges property to render the Voronoi diagram and highlight the edges.

Comment
Article Tags: