Skip to main content
100%

Voronoï playground: Voronoï map (study)

✓ Published0🌍 Public
KKcnarf
Last edited Dec 19, 2017
Created on Nov 7, 2017

A Voronoï map study demonstrates an iterative weighted Voronoï treemap algorithm, positioning and re-weighting sites until their cell areas match expected sizes. The canvas rendering offers toggles for displaying either the weighted Voronoï diagram or site weights as circles, plus grey, radial rainbow, or conical rainbow color schemes. It relies on the `d3-weighted-voronoi` plugin and D3 v4, with user controls to show or hide site markers.

AI-generated description

This block is a Work In Progress, which tries to implements a Voronoï map (i.e., one-level treemap) based on the algorithm presented in Computing Voronoi Treemaps - Faster, Simpler, and Resolution-independent. Because this algorithm requires the computation of weighted Voronoï, this block uses the d3-weighted-voronoi plugin.

Without going into details (cf. the scientific paper), at each iteration :

  • the weighted voronoi diagram is computed based on each weighted sites
  • then, each site is re-position at the center of its influence area
  • then, another weighted voronoi diagram is computed based on each weighted relocated sites
  • then, each site is re-weighted in order to fit its expected influence area

The algorithm stops when each site is no longer moved or re-weighted (more exactly, when each site is moved or is re-weighted below a certain treshold), or if a certain number of iterations is reached.

Notes :

  • only one level, no nested hierarchy
  • as stated in the scientifc paper, the algorithm reaches a stable state at approximatively 15%-20% of error (sum of differences between computed areas and expected areas is about 15%-20% of the total available area)
  • experiments show that near-zero weights are difficult to handle, causing flickering

User interactions :

  • you can choose to draw the Weighted Voronoï Diagram (default) or the weights (visualized as circles).
  • you can hide/show sites
  • you can choose among different rendering (greyscale, radial rainbow, or conical rainbow (default, having hard-&-fun time to implement it because canvas don't provides conical gradient)).

Acknowledgments to :

gpl-3.0 Licensed

Similar vizzes