https://github.com/fogleman/fireflies
Synchronizing fireflies using JavaScript and D3.
https://github.com/fogleman/fireflies
Last synced: 3 months ago
JSON representation
Synchronizing fireflies using JavaScript and D3.
- Host: GitHub
- URL: https://github.com/fogleman/fireflies
- Owner: fogleman
- Created: 2014-05-22T15:17:35.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-22T17:14:32.000Z (almost 12 years ago)
- Last Synced: 2025-01-19T15:46:28.884Z (about 1 year ago)
- Homepage: http://www.michaelfogleman.com/static/fireflies/
- Size: 188 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Synchronizing Fireflies
http://www.michaelfogleman.com/static/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 logaritmic 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.
This is a JavaScript port of code that I originally wrote in Python and C. The old code can be found here: https://github.com/fogleman/Sync