# D3 Delaunay for Processing

**URL:** <https://discourse.processing.org/t/d3-delaunay-for-processing/40261>\
**Category:** Gallery\
**Tags:** contributions\
**Created:** [December 22, 2022, 4:45pm UTC](https://discourse.processing.org/t/d3-delaunay-for-processing/40261 "2022-12-22T16:45:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnC](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JohnC](https://discourse.processing.org/u/JohnC)\
**Post date:** [December 22, 2022, 4:45pm UTC](https://discourse.processing.org/t/d3-delaunay-for-processing/40261/1 "2022-12-22T16:45:26Z")

</div>

I ported the javascript d3 Delaunay library to java for a project. Just wanna share it here in case anyone need it.  
it can be found on [https://real-john-cheung.github.io/d3-delaunay-for-processing/](https://real-john-cheung.github.io/d3-delaunay-for-processing/) (just ignore the plain design)

Cheers

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [February 23, 2023, 5:12am UTC](https://discourse.processing.org/t/d3-delaunay-for-processing/40261/2 "2023-02-23T05:12:36Z")

</div>

is this yours and is there a way to retrieve the center of the points. I’m asking that I can use the winding number algorithm along with a distance check to save on computation to hover over triangles and voronois.

---

<div class="post-metadata">

**Author:** ![JohnC](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JohnC](https://discourse.processing.org/u/JohnC)\
**Post date:** [February 23, 2023, 1:31pm UTC](https://discourse.processing.org/t/d3-delaunay-for-processing/40261/3 "2023-02-23T13:31:16Z")

</div>

Hi paulgoux, this is a port of the Delaunay module of d3.js. By the Center of the points do you mean the geometrical centre of the bounding hull? If so you can get the hull object and calculate from it.

「paul goux via Processing Foundation \<[notifications@processingfoundation1.discoursemail.com](mailto:notifications@processingfoundation1.discoursemail.com)\>」在 2023年2月23日 週四，上午5:22 寫道：
