Skip to main content
100%

Voronoi tests

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Oct 6, 2012

A test suite of 33 mini Voronoi diagrams rendered as SVGs checks edge cases for the `d3.geom.voronoi` API, focusing on degenerate configurations of one to four points. Each square plot shows clipped Voronoi cells and source points, demonstrating how the algorithm handles collinear points, duplicate ordering, and single-point inputs. The examples are generated with `d3.geom.voronoi()` with a clipping extent, using `d3.select` and inline SVG paths and circles. The source data is hardcoded in the script, comprising point arrays laid out in a grid of small graphs.

AI-generated description

Tests for edge cases with d3.geom.voronoi, mainly N=2.

gpl-3.0 Licensed

Similar vizzes