My girlfriend surprised me with the most incredible gift last night.
Some time ago, we were talking about our favorite books as kids. Mine was an illustrated account of the Earth's ecology long after human extinction. It belonged to my best friend, and we'd pass it around at school. I couldn't remember the title or author, but I'd tried a number of times to find it.
She found my "rosebud."
I found this program, CLOUDMIR.BAS, on a diskette of my first programs. In QBasic, it's a vague pattern of plump white pixels on a black screen. Porting it to Processing, I got some amazing output:
This is an iterated function system, where functions are repeatedly applied to a set of numbers and the result is plotted at each step. Its only by chance that the output looks 3D.
This algorithm for the left image goes like this:
x = x * cos(n) + c
y = y * sin(n) + c
n += c
c += 0.001
At each step, there is a little bit of error in the calculation from the computer's limited precision. Accumulating through millions of loops, rounding errors are likely reponsible for most of the chaos happening in the output.