A fun diversion!
Feb. 4th, 2005 11:55 pm![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
I wrote two applets, and both can be found running at http://soy.dyndns.org/~peter/projects/fun/mep
The grayscale version is initially interesting, but it quickly becomes obvious what is happening. There are 4 different "fighting bubblesorts" that are all manipulating this one space. One is sorting high to low from left to right, one is right to left, one is top to bottom, and the last is bottom to top. If The threads always stayed synchronized, then we would get a neat checkerboard pattern. But threads don't stay in sync, so some patterns develop.
More interesting is the second one which has 12 fighting sorts, where we have up-down, down-up, left-right, and right-left for each color channel (red, green, and blue). This one is complex enough that the patterns are kind of engrossing.
I had a lot of fun making this, I hope it's a little fun to watch. If you don't like applets, the code can be downloaded and run as an application with no changes, due to a bizarre hack. Thanks for the cool idea Mark!