Skip to main content
100%

CCPD Snowden

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Aug 1, 2017
Created on Oct 26, 2016

This example uses a Capacity Constrained Point Distribution to render a portrait of Edward Snowden from a photograph. The code loads the image via a Canvas `getImageData` call, samples pixels to generate a set of points, and then iteratively swaps points between neighboring Voronoi cells—computed with `d3.voronoi`—to evenly distribute them according to local image density. The resulting animation shows the points and Voronoi polygons updating in SVG as the distribution converges, with the final arrangement forming the recognizable portrait. The algorithm is a faster variant of the original capacity-constrained approach, using only local neighborhood swaps.

AI-generated description

Using a Capacity Constrained Point Distribution to display a picture of an American hero.

This is a variant of the original algorithm by Michael Balzer, Thomas Schlömer & Oliver Deussen (University of Konstanz, Germany, 2009), in which I use a Voronoi Diagram to create a topology of the current sites, and only swap the points between neighbouring sites (and neighbours of neighbours). It appears to be much faster than the original algorithm.

See also https://seenthis.net/messages/619204 for an application in cartography.

Note to self: do not edit on BlockBuilder

mit Licensed

Similar vizzes