Saturday, July 16, 2011

Large buddhabrot fractal

So I've been messing around with the buddhabrot fractal again (credit to Melinda Green for its discovery). I do this at least once most summers. Tradition I guess. This time, with more hardware at my disposal than previous years, and some work put into optimizing the algorithm by introducing a bit of a handwavy heuristic for which areas are inside the Mandelbrot set, I've managed to generate a very large map of the fractal.

Just now I ran a test-run of 20,000 x 20,000 pixels, and this is with 16 samples per pixel, as I've hit a brick wall in terms of system memory, but supersampling is still viable. I set iteration depth to 1,000,000. Run time was around one and a half hour on my laptop which has an i5 M450 CPU, and the code is multi-threaded and makes use of all of the cores and hyper-threading and whatnot.

The result is a png file that is almost 400 Mb in size, which poses a bit of a logistics problem. The result is absolutely stunning. I would love to share it with the world, but I have no idea how to go about it. Maybe using the google maps API? That still poses a problem of where to host almost half a gigabyte of image data.

Anyway, until I figure that out, here are some samples (the full image consists of 625 tiles of this size, though some of the edge tiles are all black).