Skip to main content
100%

Gooey Force Layout N-body Problem - Canvas

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

This example shows a gooey, blob-like visualization of 400 nodes simulated with an N-body force layout, rendered on a Canvas element. The simulation uses `d3.forceSimulation` with a `forceManyBody` charge and no velocity decay, causing the nodes to move continuously. Each frame, `d3.contourDensity` computes density contours from the node positions, and `d3.geoPath` draws the filled and stroked contour shape, creating a smooth, merged form. The code uses D3 v4 and the d3-contour and d3-scale-chromatic libraries.

AI-generated description

Building upon this svg based force layout with contours, but with canvas

Similar vizzes