Skip to main content
100%

Experiment �� <a href="http://bl.ocks.org/3116713" title="view this gist via bl.ocks.org">?</a> <a href="http://bl.ocks.org/GerHobbelt" title="view a list of all my gists at bl.ocks.org">8</a>

✓ Published0🌍 Public
GGerHobbelt
Last edited Sep 10, 2012
Created on Jul 15, 2012

This visualization demonstrates collision detection among 200 colored circles in a bounded 1280×800 space, with a stationary root node that repels other nodes when the mouse moves. It uses D3’s force layout with gravity and a negative charge on the root, while a quadtree (`d3.geom.quadtree`) efficiently resolves pairwise overlaps during each tick. Circle positions update via SVG attributes, and the fixed root node follows mouse coordinates, resuming the simulation on mousemove events.

AI-generated description

Experiment �� <a href="http://bl.ocks.org/3116713" title="view this gist via bl.ocks.org">?</a> <a href="http://bl.ocks.org/GerHobbelt" title="view a list of all my gists at bl.ocks.org">8</a>

copy of http://mbostock.github.com/d3/talk/20111018/collision.html

Similar vizzes