Skip to main content
100%

Untitled

✓ Published0🌍 Public
Aansnejib2468
Last edited Jan 27, 2020
Created on Jan 27, 2020
Forked from React Starter

A force-directed layout uses D3's `d3.layout.force` to simulate repulsive and attractive forces among 200 circles, each with a random radius between 4 and 16 pixels. The root node is fixed at the center with a negative charge, pulling all other circles toward it while collision detection via `d3.geom.quadtree` keeps them from overlapping. As the simulation ticks, circle positions update in an SVG canvas, and users can drag the root node by moving the mouse, which resumes the force simulation to re-layout the surrounding nodes dynamically.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes