Michael Fogleman

ProjectsAboutResumeMore

Fireflies May 2014

6 JavaScript

Simulating the behavior of synchronizing fireflies.

An experiment inspired by the book Sync: How Order Emerges From Chaos In the Universe, Nature, and Daily Life by Steven H. Strogatz.

Each cell flashes every few seconds. The cells influence each other in such a way that they will all eventually synchronize, as do some species of fireflies.

The cells charge following a logarithmic curve similar to that of a charging capacitor, firing upon reaching a threshold. This affects neighboring cells by a factor proportional to the inverse of their squared distance. The cells need not have identical individual frequencies to reach sychronization.