Skip to main content
100%

Fun with d3 contours and force layouts

✓ Published0🌍 Public
Aandrew-reid
Last edited Nov 4, 2017
Created on Nov 4, 2017

A force-directed simulation of 2,000 nodes drifts across a canvas while a contour density field, computed via `d3.contourDensity`, is redrawn each tick with `d3.geoPath`. The contour thresholds increase over time, causing the filled regions to shrink and eventually vanish as the simulation settles. The color cycles through a steelblue-to-orange scale using a linear interpolator, and the canvas context directly handles all rendering. The example demonstrates how dynamic thresholds and a decaying force layout produce a gradually drying-up visual effect.

AI-generated description

A deviation of this. Visualization will end/dry up as the contour density threshold increases past the maximum density of the force nodes - leading to some neat final results.

Similar vizzes