Skip to main content
100%

Collision Detection

✓ Published0🌍 Public
Mmbostock
Last edited Sep 16, 2020
Created on Aug 1, 2012

Interactive collision detection shows 200 colored circles moving inside a rectangular SVG viewport. Moving the mouse repels the circles, pushing them apart and causing them to collide and bounce off one another. The visualization uses D3 v3’s force layout and quadtree-based collision handling via `d3.layout.force` and `d3.geom.quadtree`, with mouse movement updating a fixed root node to drive repulsion. Rendering is done with SVG circle elements, and the force simulation updates their positions on each tick.

AI-generated description

Mouseover to repel nodes. Adapted from my talk on force layouts. Compare to the canvas version.

gpl-3.0 Licensed

Similar vizzes