Voronoi Spanning tree - short paths
The visualization draws a Voronoi spanning tree that connects 1,500 randomly placed sites by hopping from each site to a neighboring site closer to a moving root point. As the mouse moves, the tree’s edges recompute in real time, highlighting short paths toward the cursor. Built with D3 v4, it uses `d3.voronoi` to compute cells and edges, with a custom `diagram.find()` and `diagram.next()` method to traverse the diagram. The SVG rendering shows semi-transparent polygon boundaries and black spanning lines, with red highlighting on found cells.
AI-generated descriptionUsing <a href='http://bl.ocks.org/Fil/1b7ddbcd71454d685d1259781968aefc'>Voronoi.find(x,y)</a> to create a spanning tree.
The strategy is to hop from any site to the nearest site that is nearer to the designated root (compare to the <a href='http://bl.ocks.org/Fil/82d889261f3b980a932fb9f9ef299c40'>Voronoi spanning tree long path</a>).
See also the colorized version.
Original work by Philippe Rivière for d3-voronoi (issue 17).