After a few balls are dropped, an implied (solid) rotating cylinder should appear.

The cool thing is the cylinder is an entirely emergent behavior, each of the individual balls follows a very simple behavior: every click of the clock, if a ball is to the left of center, a positive constant value is added to its velocity, if it's to the right, the same value is subtracted.

Another interesting aspect of this cylinder is that there's no bias as to which direction it's turning, if you focus on a single ball, you should be able to mentally see the entire thing rotating the opposite way.

I first saw this effect at a Boston museum, I think the Computer Museum but it might've been the Science Museum.

Later I saw the same effect used for the star map in the original Star Control game for PC.

You can view the source code. It's a nice simple example of doing flicker free double buffering in java, though it uses a few deprecated functions (couldn't be bother to track down the updated versions.)

Back to ballcan