Skip to main content
100%

no overlap circles one axis

✓ Published0🌍 Public
PPatrick Wojda
Last edited May 20, 2019
Created on May 20, 2019

Seven dark circles all start at the vertical center of a small SVG canvas. A custom force function pins each circle’s x-coordinate to the middle of the frame while clamping its y-coordinate within the bounds. The d3.forceSimulation API applies a repulsive `forceManyBody` force, causing the dots to spread vertically into a column. After 100 ticks, a second set of red circles is drawn over the final positions, showing the result with faint overlaps.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/GitNoise/'>GitNoise</a>'s block: <a href='http://bl.ocks.org/GitNoise/7601e72e769923346068ee5c204db9ad'>force sim. along one axis w. bounds</a>

mit Licensed

Similar vizzes