
Voronoi Tessellations - sebg
http://datagenetics.com/blog/may12017/index.html
======
mkeeter
I find it particularly interesting that this post steals images from my blog
[1], then adjusts the saturation / brightness on them so that a reverse image
search thinks they are unique.

Please don't do this. Folks put effort into well-illustrated explanations; if
you're going to re-use content, at least put an attribution and link on there!

[1]
[http://www.mattkeeter.com/projects/swingline/](http://www.mattkeeter.com/projects/swingline/)

~~~
squeakynick
(Author here)

Matt, I'm very sorry. It was a genuine mistake. I always try hard to attribute
sources (as you can see from the references in the doc, and on the couple of
hundred other articles on my blog). It was nothing personal, it was an
oversight :)

I've corrected this now on the site. Sorry again. Thanks for bringing this to
my attention.

Regards

/\/ick

~~~
mkeeter
Thanks for the quick fix; I quite enjoyed the writeup.

------
catwell
Voronoi tesselation is also a step in K-Means, which is one of the most well-
known clustering algorithms (typically used for quantization). Here is a page
with an interactive visual example for it:
[https://www.naftaliharris.com/blog/visualizing-k-means-
clust...](https://www.naftaliharris.com/blog/visualizing-k-means-clustering/)

Note that the DataGenetics article talks about 2D Voronoi cells but they (and
K-Means as well) can be generalized to a space of any dimensionality.

~~~
JohnStrange
They are also used for Conceptual Spaces in cognitive science and semantics. I
wonder what's the most efficient visualization algorithm for k-dimensions when
a set of central points is provided. Is it Fortune's algorithm or are there
faster ones?

------
cromulent
You can create these easily using SQL, Postgres, & PostGIS.

[https://postgis.net/docs/ST_VoronoiPolygons.html](https://postgis.net/docs/ST_VoronoiPolygons.html)

------
Jack000
the point + line generalized Voronoi diagram is also related to the medial
axis, which is used for calculating offsets in CNC applications:

[https://www.cosy.sbg.ac.at/~held/projects/vroni/vroni.html](https://www.cosy.sbg.ac.at/~held/projects/vroni/vroni.html)

you need the medial axis for v-carving, to control the CNC like so:
[https://youtu.be/jJhaDHmXvsY?t=1m15s](https://youtu.be/jJhaDHmXvsY?t=1m15s)

------
pacaro
Interesting reading the different methods for creating the Voronoi
tesselation. I've always built the Delaunay triangulation first, I guess I
knew there were other approaches, just never bothered to find out what.

If you generate a Voronoi tesselation for a set of points, you can then merge
neighboring areas to create isoclines

------
FreeFull
The article mentions Delanuay triangulation, but it doesn't mention that one
way to calculate a Voronoi tesselation is to calculate the Delanuay
triangulation first.

~~~
btschaegg
Interestingly, the reverse as also very true: A simple and rather effective
method to calculate a delaunay triangulation on a set of 2D points on a GPU is
to actually calculate the according Voronoi diagram (discretely) into a
texture (using jump flooding) and handling the edges between the cells[1][2].

[1]:
[http://www.cs.utah.edu/~maljovec/files/DT_on_the_GPU_Print.p...](http://www.cs.utah.edu/~maljovec/files/DT_on_the_GPU_Print.pdf)

[2]:
[http://www.comp.nus.edu.sg/~tants/delaunay/GPUDT.pdf](http://www.comp.nus.edu.sg/~tants/delaunay/GPUDT.pdf)

------
tlrobinson
Voronoi tessellations are common in data visualizations to increase the size
of click/hover targets and to position labels. It's built into d3:
[https://github.com/d3/d3-voronoi](https://github.com/d3/d3-voronoi)

------
DizzyDoo
Voronoi diagrams are used a lot in game development too, in creating and
recalculating navmeshes in games where the navigation graph changes often. I
have a game project underway right now where the player can build fences,
lampposts and other obstacles, and the hundred plus AI actors need to be able
to navigate it in real-time. Recalculating the Delauney Triangulation and the
Voronoi tessleation is expensive, so I just sent it to a thread, it's
worthwhile to do all that work because A* pathfinding on anything other than a
navmesh would be, for my project, incredibly slow. This sort of algorithm is a
great thing to know that it exists and have in your backpocket.

EDIT: I have a little devlog about the game I'm developing full-time, back in
October 2015 I made a video where I talked through the first pass of my
Voronoi/Navmesh implementation. Might be worth watching if anyone wants to see
the tesselation overlaid onto a game world, for a real-life usage of the
algorithms:
[https://www.youtube.com/watch?v=zPD3HqI6HDE](https://www.youtube.com/watch?v=zPD3HqI6HDE)
I should assure everyone that the game looks _very_ different now thought! No
more checkerboard textures...

------
nissimk
Marc DiMarco gave really entertaining presentation on user interface
algorithms at acm applicative conference a couple of years ago including
covering the voronoi diagram.

I think this is an earlier version of the same presentation

[https://youtu.be/8_75wViQQY8](https://youtu.be/8_75wViQQY8)

It was interesting to hear about the use by an early epidemiologist to find
the bad water source during the cholera outbreak in London.

------
shaneos
If you're interested in building Voronoi and Delaunay graphs in C++, I wrote
some easily reusable code years ago, a fixed up version of Stephen Fortunes
algorithm.

[http://chofter.com/mapviewer/voronoi.php](http://chofter.com/mapviewer/voronoi.php)

Pardon my pre-web-engineer lack of HTML knowledge, I was young and mind melded
with robots at the time :-)

~~~
shaneos
Related, another cool thing that Voronoi graphs are useful for is enumeration
all possible paths a robot can take in an environment. This can be used to
determine the quality of the map built with sonar/radar/lidar, to better
understand the value of a sensor or algorithm in SLAM.

I wrote a paper on it long ago, the third one listed here if you're interested

[http://chofter.com/masters.php](http://chofter.com/masters.php)

------
shane_dw
Here is a fullscreen Voronoi made by Neave.

[https://neave.com/voronoi/](https://neave.com/voronoi/)

------
Zeustastic
Good (visual) explanation!

Voronoi helped us once to make a game:
[https://www.airconsole.com/play/multiplayer-
games/polyracer](https://www.airconsole.com/play/multiplayer-games/polyracer)

------
ktzar
I did a while ago a simple implementation of k-means in Javascript, it shows
how the process converges for cluster finding. [http://ktzar.github.io/js-k-
means-clustering/](http://ktzar.github.io/js-k-means-clustering/) code:
[https://github.com/ktzar/js-k-means-clustering](https://github.com/ktzar/js-
k-means-clustering)

------
teddyh
/usr/lib/xscreensaver/voronoi

man voronoi:

“ _This implementation takes advantage of the OpenGL depth buffer to compute
the cells for us, by rendering the intersection of overlapping cones in an
orthographic plane._ ”

[https://www.youtube.com/watch?v=hD_8cBvknUM](https://www.youtube.com/watch?v=hD_8cBvknUM)

------
sethammons
I've seen a website background that looked like the shifting gif. Something
fancy in js that some developer made. Looked really neat. Ate 100% of my CPU
to look at their main site or blog, but it did look neat. Nice to get an idea
of what they were doing.

------
rq1
Check out [http://www.quantize.maths-fi.com/](http://www.quantize.maths-
fi.com/) The website is edited by some of the best mathematicians in numerical
probability field.

------
kgilpin
These are also used to create the mesh for computational fluid dynamics.

------
agumonkey
Anybody used catmull-clark on top of voronoi ? Just curious.

