Skip to main content
100%

winter force

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 3, 2018
Created on Jun 1, 2018

Two groups of colored nodes—blue and green—hover near the center of a canvas, responding to mouse clicks on Split and Unite buttons that reconfigure their positions. The visualization renders each frame to a 2D Canvas context, using `d3.forceSimulation` with `d3.forceManyBody`, `d3.forceX`, and `d3.forceY` to control attraction and separation. Clicking Split drives the blue cluster to the left and green to the right; Unite pulls them back toward overlapping centers while adding `d3.forceCollide` to keep nodes from merging. Node positions, colors, and radii are set per object, with 200 blue and 50 green circles generated randomly.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/larsvers/'>larsvers</a>'s block: <a href='http://bl.ocks.org/larsvers/36bca23bdaf669ca0fe0a8213a57147c'>Force split and unite on canvas</a>

mit Licensed

Similar vizzes