Profile Picturetmhglnd
€0+

voronoi.delaunay.triangulation

2 ratings
Add to cart

voronoi.delaunay.triangulation

€0+
2 ratings

>> Support a charity (<- a few are listed here) || Support me on -> patreon | ko-fi

>> This program is distributed in the hope that it will be useful, but without any warranty

About

This repository contains 3 patches, all various studies on the subject of delaunay triangulation and voronoi diagrams. The Delaunay Triangulation subdivides a set of points into triangles, in such a way that the circumcircles of those triangles don't contain any other points. When connecting the centers of the circumcircles of the Delaunay triangles, you get the Voronoi Diagram. Next the voronoi diagram can be used as a starting point to apply Lloyd's Algorithm, also called Voronoi Relaxation. This will slowly give all the cells an even amount of space and "relax" the surface subdivision.

I was initially inspired by the Coding Train tutorial about Weighted Voronoi Stippling. Since I'm a Max user I was interested to see if this was doable to recreate in Jitter. I used the new `[v8]` javascript engine in Max9, which is many times faster than the previous `[js]` object. I also made use of the faster typed-arrays `Float32Array` to work with matrices within v8, instead of working directly on the matrix. For the calculations of the Triangulation and the Voronoi I use the [d3-delaunay](https://www.npmjs.com/package/d3-delaunay) node package, but it's not used within `[node.script]`, instead it is included in [v8] via `require()`.

All the code is commented throughout for you to read and learn from.

If you have any questions, comments, bug-reports or suggestions. Please feel free to contact me via info@timohoogland.com.

Usage

1. 🤓 Install Max9

2. 👾 Download or clone this repository

3. 🚀 Start Max9 and open the first study `1_delaunay-triangulation.maxpat`

4. 🪄 Click `enable` to start the `[jit.world]` rendering

License

The visual output and aesthetic of the patches is licenced under the CC BY-NC-SA 4.0 License

The code is licensed under the MIT License

€
Add to cart
71 downloads

Ratings

5
(2 ratings)
5 stars
100%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
0%