Skip to content

Instantly share code, notes, and snippets.

View alexrutherford's full-sized avatar

Alex Rutherford alexrutherford

View GitHub Profile
@alexrutherford
alexrutherford / dREADME.md
Last active September 25, 2015 23:57 — forked from mbostock/.block
Clustered Force Layout I

This clustered force layout is implemented using two custom forces. The first, cluster, pushes nodes towards the largest node of the same color. A second collide force prevents circles from overlapping by detecting collisions.

This example uses standard gravity; compare to custom gravity applied only to the largest node of each color. To minimize distracting jitter during initialization, try an entry transition.