Live data from Hacker News

World Airports Voronoi (2014)

jasondavies.com

31–40 of 114 posts

Re: World Airports Voronoi (2014)

#31
Interesting to compare with ETOPS (good maps: gc.kls2.com) which governs how far away from acceptable alternate airports a commercial plane can be. It corresponds to safe flying time with a single functional engine. So a lot of the area in some of the larger Voronoi regions, especially in the Southern Hemisphere, is actually unreachable by any commercial flight from the closest airport.

Re: World Airports Voronoi (2014)

#32

Earlier quoted context omitted.

Ability to divert in an emergency?

Absolutely. It's a map of closest airport for any location on earth. You could do different versions of this for different classes of plane (e.g. select a minimum runway length).

This has a big influence on which routes a plane can fly. You can’t be more than a certain distance from a usable airport at any time during the flight to mitigate the risk of engine failure resulting in an off-airport landing/crash. See: https://en.m.wikipedia.org/wiki/ETOPS

Re: World Airports Voronoi (2014)

#33
post #29

This is my favorite instance of a voronoi diagram: https://imgur.com/a/zjNWL I actually wrote into the Reese's company to find out what that was happening to their giant cups, and got no reply unfortunately.

Patterns like this form in cooling rocks although I have no idea whether that's related to peanut butter cups.

Re: World Airports Voronoi (2014)

#35

Voronoi diagrams are so fun. I messed around for months with them after I saw Amit Patel's procedural map generator that used them. http://www-cs-students.stanford.edu/~amitp/game-programming/... Fortune's Algorithm is pretty simple, but it's tricky to get right, particularly if you're also maintaining the information in a form that lets you do something useful with it besides spitting out the points of the Voronoi c…

I also consider Voronoi diagrams fun, and in my life I've implemented three different algorithms for generating 2D Voronoi diagrams (or Delaunay triangulations, which are the duals of Voronoi diagrams):

1. Fortune's algorithm [0]

2. The Bowyer-Watson algorithm for generating the Delaunay triangulation incrementally [1]

3. Quickhull (which generates the 3D convex hull of points, which is the 2D delaunay triangulation of points). [2]

Of these, Quickhull is the simplest, and Bowyer-Watson is by far the hardest. Bowyer-Watson seems very simple, but there are demons hiding in that algorithm, and almost every implementation you can find online is incorrect (for instance, this one [3]). You can tell that these implementations of Bowyer-Watson are incorrect, because every Delaunay triangulation contains the convex hull of the points, and it's easy to tell when they don't. In fact, even the description in Computational Geometry: Algorithms and Applications (a standard textbook) is subtly wrong.

The reason Bowyer-Watson is hard is this: it's an incremental algorithm where you add the points one-by-one to an already constructed Delaunay triangulation, you make sure all edges are flipped right, and at the end you have the full triangulation. However: you have to have a triangle to start with. In order for the algorithm to work, this initial "super-triangle", has to contain all the points in the set, and also be made up of points that are not contained in any circumcircle of any combination of three points in the set. However: if three points are colinear (or very close, which it is almost guaranteed some points are going to be), the circumcircle of those three points is MASSIVE (essentially "infinite", covering the entire half-plane). But the super-triangle points still have to be outside of it. This means that the super-triangle points have to be essentially "symbolic" points (not normal points with coordinates, but special magic points), and you have to hard-code special rules for them. It is extremely difficult to implement these rules correctly.

Fortune's algorithm is on the surface more complex, but there's less goblins hiding in that algorithm. There's some tricky data-structure stuff, but it's not too bad. Quickhull is fairly straight-forward, and is the algorithm I would recommend if you want to give this whole Voronoi adventure a go (also has the benefit of giving you a 3D convex hull algorithm, which you can have all sorts of fun with!).

[0]: https://en.wikipedia.org/wiki/Fortune%27s_algorithm

[1]: https://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorith...

[2]: https://en.wikipedia.org/wiki/Quickhull (this description is for the 2D version, but the 3D version is similar)

[3]: https://cdn.rawgit.com/axelboc/voronoi-delaunay/v2.1/index.h...

Re: World Airports Voronoi (2014)

#36
post #14

Earlier quoted context omitted.

Voronoi diagrams work for any definition of `distance` that may suit your needs. So weighting by airport size and/or sea distance is pretty trivial.

I don't think it's that simple if the definition of distance is a function of position.

[deleted]

Re: World Airports Voronoi (2014)

#37
post #33
post #29

This is my favorite instance of a voronoi diagram: https://imgur.com/a/zjNWL I actually wrote into the Reese's company to find out what that was happening to their giant cups, and got no reply unfortunately.

Patterns like this form in cooling rocks although I have no idea whether that's related to peanut butter cups.

It is related.

When rocks cool, crystals start to grow from multiple seeds because of thermal/chemical impurities. If the material is sufficiently homogenous in composition and temperature, then the crystals from different seeds will grow at the same rate. When they grow into each other, a boundary between different crystal domains will form. Crystal domains formed this way look like Voronoi cells.

The peanut butter cup looks like this because it's injected from several outlets with an approximately constant flow rate. Each injector outlet forms a Voronoi cell of peanut butter under it.

Re: World Airports Voronoi (2014)

#38
I've flown in and out of Mataveri and I know it sounds superstitious or whatever, but I felt that isolation. It's amazing to me that the Polynesians were able to colonize so widely.

Also, I love Voronoi diagrams. I ran across them many moons ago when I was building a wayfinding application and was looking for ways to generate map meshes—this was not that—but I thought they were super interesting.

Re: World Airports Voronoi (2014)

#39
post #30
post #29

This is my favorite instance of a voronoi diagram: https://imgur.com/a/zjNWL I actually wrote into the Reese's company to find out what that was happening to their giant cups, and got no reply unfortunately.

I would guess they have injectors for the filling at the centers of those cells. A Voronoi edge is equidistant from the two points it bisects, so it kind of makes sense that this would happen naturally if the filling is injected at a constant rate.

I'd guess more likely that they are chocolate nozzles -- it seems more straightforward to me to produce a precise chocolate "cup", pour or place the filling inside of it, then pipe a chocolate "lid" onto the cup. Presumably the multiple nozzles of chocolate would help it to settle flatter faster.

Edit: there's a video on Facebook that covers the whole process in a minute. My hunch is partly right: the wrapper and chocolate cup are indeed completed first, then a circle of peanut butter is indeed placed in, then the thing is shaken to encourage that peanut butter to fill the space uniformly. However the chocolate "lid" is just plopped on as one wide dollop from a hose, and then blown out across the cup with compressed air: so the Voronoi cells probably come either from this blowing phase, or else the hose has some sort of "spreader" inside of it or so.

Re: World Airports Voronoi (2014)

#40
post #37
post #33

Earlier quoted context omitted.

Patterns like this form in cooling rocks although I have no idea whether that's related to peanut butter cups.

It is related. When rocks cool, crystals start to grow from multiple seeds because of thermal/chemical impurities. If the material is sufficiently homogenous in composition and temperature, then the crystals from different seeds will grow at the same rate. When they grow into each other, a boundary between different crystal domains will form. Crystal domains formed this way look like Voronoi cells. The peanut butter…

I know the former bit. I don't see how the latter obviously follows. You're basically saying it's related because it looks the same but it's clear from the picture it looks the same.
Post reply on HN