Skip to main content
100%

Untitled

✓ Published0🌍 Public
Tthanhtrant219
Last edited Jun 4, 2020
Created on Jun 4, 2020
Forked from HTML Starter

This example shows a force-directed layout of 200 colored circles that repel each other and collide as they move. Dragging the mouse moves a fixed root node, pulling the surrounding circles toward the cursor. The visualization uses D3 v3’s `d3.layout.force` with custom gravity and charge functions, and a quadtree via `d3.geom.quadtree` to efficiently handle collision detection between circles. Each circle’s radius is randomly assigned, and its fill color comes from a categorical scale (`d3.scale.category10`). The rendering is done in SVG, with positions updated on each tick event.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes