Uniform Random III
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jun 15, 2014
This example generates 10,000 random points within a fixed width and height, then computes their Voronoi diagram using `d3.geom.voronoi` with a clip extent matching the SVG canvas. Each Voronoi cell is rendered as an SVG path, filled with a color from a cubehelix scale (`d3.scale.cubehelix`) that maps the cell’s polygon area to a hue range. The coloring transitions smoothly from bright green to deep purple as area increases, creating a visually textured mosaic. The code uses D3 v3, the custom cubehelix interpolation library, and random uniform sampling.
AI-generated descriptiongpl-3.0 Licensed