block by Kcnarf e062012f6f08d6e987302aa5a5919bf0

D3-voronoi.clipCircle() - 2nd experiment

Full Screen

This block experiments how to programmatically circle-clip a Voronoï tessellation, and does not rely on the browser to do the clipping in the screen space. It is a is a continuation of a previous one, and follows the work done by Philippe Riviere in its Circular Bounded Voronoi Tessellation.

By default, d3.voronoi comes with a rectangular clipping, through the d3-voronoi.extent() API. This block shows another way to clip the initial tesselation.

The algorithm used in this block is basically a copy/paste of the algorithm used in the d3.distanceLimitedVoronoi d3 plugin I made. The two algorithms have distinct purposes: the plugin leverages UX by defining [interactive and not-too-far] areas around each site, whereas this block define a global clipping.

Acknowledgments to:

index.html