If all you need is an image of colored Voronoi regions (and no actual graph structures), there are faster algorithms, for example based on http://fab.cba.mit.edu/classes/S62.12/docs/Meijster_distance... which run in O(width * height + number_of_points) instead of O(width * height + number_of_points * number_of_pixels_on_cone) as this GPU implementation does.
Cool. I suggest having it generate a diagram as soon as the page loads, because when I saw the black canvas I assumed that there was a problem with the WebGL support in my browser.
Pretty neat, but would be even nicer if display of the points could be turned off, so that you could see just the resulting shapes, especially with the motion feature.
11 comments
[ 4.5 ms ] story [ 33.6 ms ] thread> var height = coneRadius / Math.tan(45 * Math.PI / 180.0)
Doesn't that just divide coneRadius by 1? Is there something that I'm missing here?
(ignore the LAB color picker, no idea what I was thinking...)
But sometimes straight lines have some kind of angle introduced which shouldn't be there in a correct Voronoi tessellation.
For example: {"sites":[355,413,372,413],"queries":[]} should be a straight line, but has two angles. Have I missed something?