The red particles are connected by springs (in white) which pull them together when they move too far apart, or push them strongly apart if they move too close together. Each one moves under the influence of gravity and the combined effect of the springs joining it to its neighbours. Although initially placed in concentric circles, the springs soon pull the particles into a hexagonal arrangement. A slight damping effect in the springs causes them to eventually slow down.
Clicking with the mouse makes nearby particles turn green, enabling you to drag them while holding down the mouse button, affecting all the others in their turn.
Pressing 's' enables or disables the view of the springs, pressing 'g' switches gravity on and off.
Source code: MultiSpringNodes (or in Java)
Built with Processing