Skip to main content
100%

Multi-Foci Force Layout

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Sep 29, 2011

Five fixed nodes serve as force foci that attract and repel moving nodes in a 2D space. As the mouse moves, the user spawns new nodes with random radii and colors; these nodes are pulled toward a focus matching their type while colliding with each other via a quadtree. The simulation runs on D3 v3’s force layout with custom attraction and collision logic, rendering everything as SVG circles with animated transitions that remove nodes after three seconds. The `d3.layout.force` API drives the physics, and `d3.geom.quadtree` accelerates collision detection.

AI-generated description
gpl-3.0 Licensed

Similar vizzes