Voronoï playground: Voronoï treemap (study)
This block experiments how to produce a hierarchical Voronoï treemap based on hierarchical/nested data (cf. d3.hierarchy). It uses the d3-voronoi-map plugin which compute one-level Voronoï maps.
- the algorithm, initiated with the root node and the clipping polygon, is as follow:
- if node as children, compute the one-level Voronoï map of the clipping polygon and the children’s data, thanks to the d3-voronoi-map
- repeat for each child with children and child-related computed polygon
- this is a layered algorithm: the Voronoï map of a particular node must be computed/stabilized before computing nested Voronoï maps of nested data; this approach ensures that clipping polygons remain the same when computing nested Voronoï maps; otherwise, the algorithm should handle sites that may become out of clipping polygons
User interactions :
- you can choose to draw the Weighted Voronoï Diagram (default), the weights (visualized as circles), or both.
- you can hide/show sites.
Acknowledgments to :