3 ms·
It runs Voronoi every step instead of building polygons once? Why?
by golergka 11y ago
It runs Voronoi every step instead of building polygons once?
Why?
- jacobolus 11y agoNo it does not. Computing the spherical polygons that make up the Voronoi diagram just happens once. The expensive part is rendering them in an arbitrary map projection. Considering this is an orthographic projection, and therefore spherical polygon edges are all ellipses, rendering this picture could certainly be special-cased to only draw ellipses and thereby run much faster. But it’s using a very general D3-geo framework. If you want you can easily tweak the code and the map will be drawn on whatever projection you like. To see some of the possibilities, go to http://bl.ocks.org/mbostock http://bl.ocks.org/mbostock and scroll down a bit.