Node Garden Effect

About

We basically just draw a line between two particles if they are within a certain distance from each other.

Particles also have a simple spring acceleration towards one another, which can make for some complex looking shapes.

This demo uses a uniform grid for space partitioning in order to do a faster neighbour lookup (basically collision detection) with a lot of objects.

A demo app for comparing the performance of the naive collision detection method against the grid based one can be seen HERE.

Source Code

Can be found on my GitHub.

Credits

The grid algorithm and basic idea is presented in AdvancED ActionScript Animation by Keith Peters.