[racket] fruit flies

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Mon Sep 12 17:47:35 EDT 2011

I wanted to share another small web-world demonstration in Whalesong.

Try this in Google Chrome:

   http://hashcollision.org/whalesong/examples/boid/boid.html

Source code:

   http://hashcollision.org/whalesong/examples/boid/boid.rkt
   http://hashcollision.org/whalesong/examples/boid/index.html


What makes this program interesting is that I really am only touching
the left and top css attributes on each clock tick, as opposed to
redrawing the whole scene (as would be demanded in a regular world
program).  Inspect Element in Chrome should bear this out.

I should probably call this program "fruit-flies".  In any event, this
works on Chrome, but I haven't been able to successfully make it run
under other browsers.  I've heard that it works in Safari 5.1 as well.



Posted on the users mailing list.