Skip to main content
100%

Circular Bounded Voronoi Tessellation

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Aug 17, 2016
Created on Aug 17, 2016

This example displays a Voronoi tessellation of one hundred randomly placed circular sites, with a colored convex hull that fully encloses the diagram and a single site that follows the mouse. The hull shape is derived from `d3.polygonHull` and then expanded outward along each vertex’s centroid radial angle using a distance calculated from the median of the Delaunay links, computed with `d3.median`. The code uses `d3.voronoi` with an extent, and renders the result as SVG paths, lines, and circles. The convex hull itself is drawn as a closed Catmull‑Rom curve via `d3.line().curve(d3.curveCatmullRomClosed)`, with additional artificial points added along the expanded hull boundary to ensure the tessellation stays within it.

AI-generated description

Bounded Voronoi Tesselation using the algorithm described in xlr8r.info

This is a variant of the <a href='http://bl.ocks.org/Fil/711834f9dc943d1de9c9577b10a7a872'>Bounded Voronoi Tessellation</a>, with:

  • circularly distributed sites

  • the median distance instead of the mean (allowing a small optimisation)

  • many more exterior control points

  • a d3.curveCatmullRomClosed convex hull shape

  • not displaying links and sites

 

Other (unfinished) variants:

Author: Philippe Rivière, August 2016


Based on <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4060366'>Voronoi Tessellation</a>

gpl-3.0 Licensed

Similar vizzes