Skip to main content
100%

Merge Sites

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Dec 13, 2016
Created on Dec 13, 2016

This example simulates the merging of 300 randomly generated circles based on their size and proximity. It shows how smaller circles are absorbed into larger, overlapping ones, with the resulting combined circle repositioning to reflect the merged mass. The animation progresses in discrete steps, with circles fading out as they are subsumed, until only the largest remain. The code uses d3.v4's selection and transition APIs to animate SVG circle attributes, with the merge logic implemented as a custom iterative function.

AI-generated description

In answer to a question on the d3 Slack channel #help

See also the simpler version in one move

Built with blockbuilder.org

mit Licensed

Similar vizzes