[Squeakland] how to determine closest neighbor

John Voiklis voiklis at redfigure.org
Mon Jan 12 13:27:12 PST 2004


In my paper and presentation text for the Squeak conference in Kyoto I
made the mistake of mentioning syncing fireflies.  I feel that I can't get
away without presenting a working firefly simulation as part of the
presentation.

For the presentation, I am not so concerned that the fireflies behave
exactly as they do in nature...only that they appear so. Nonetheless,
faking it is only an option of last resort. The aspect of natural behavior
I am most concerned with simulating is that local behavior leads to global
behavior.

In the paper, I claim that each firefly tracks the flash frequency of
two nearby neighbors; it slows or accelerates its own frequency to
match that of its neighbors until, thanks to the wonderful majic of
network sync, the group of fireflies flash in unison.

Most of this is pretty easy, but I can't, for the life of me, figure out
how to get each firefly to automatically determine its closest neighbor.

Any ideas?

Thanks,

John



More information about the Squeakland mailing list