https://github.com/fogleman/sync
Code inspired by the book.
https://github.com/fogleman/sync
Last synced: 9 months ago
JSON representation
Code inspired by the book.
- Host: GitHub
- URL: https://github.com/fogleman/sync
- Owner: fogleman
- Created: 2013-01-15T21:38:17.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-03-11T19:35:43.000Z (about 12 years ago)
- Last Synced: 2025-05-13T08:43:32.439Z (11 months ago)
- Language: Python
- Homepage:
- Size: 336 KB
- Stars: 31
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Sync: Virtual, Synchronizing Fireflies
A synchronization 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 roughly once every few seconds. The cells
influence each other in such a way that they all eventually synchronize,
similar to synchronizing fireflies.
There is a 2-D implementation (wxPython) and a 3-D implementation (Pyglet).
Several configuration parameters are available...
* Grid Width, Height and Depth
* Simulation Speed
* Average Cell Period
* Influence Factor
* Cell Similarity Factor
Each cell charges following a curve similar to a charging capacitor. When
the cell reaches a threshold, it fires causing a blink in the visualization.
The cell firing also kicks 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 can be tested by tweaking
the similarity factor, which causes the cells to vary in their charging times.
## Videos
* 2D: http://www.youtube.com/watch?v=1G6GHQ-EbJI
* 3D: http://www.youtube.com/watch?v=KWwe4uMOmVY
## Screenshot (2D)

## Screenshot (3D)
