nhbess

generic description

An unexpected fractal | nhbess

An unexpected fractal

July 20, 2024

Some time ago I wrote a program for visualizing search algorithms in a grid. A relatively simple Breadth first search that mutates its color on each search depth over a grid.

Nice plots. Extremely slow.

Image 0 Image 1 Image 2 Image 3
Image 4 Image 5 Image 6 Image 7
Image 8 Image 9 Image 10 Image 11
Image 12 Image 13 Image 14 Image 15
Image 16 Image 17 Image 18 Image 19

So I tried to rewrite it in a more efficient fashion, but somewhere on the process I made a mistake in the code, and there it was: an unexpected fractal suddenly appeared.

This is a centered view, the ‘square shape’ repeats as it grows. I still don’t know what went wrong, but I’m happy with the result.

Galery

I decided that before fixing the bug I would make a few more tests. Funny thing is that when changing the kernel (neighborhood) the fractal nature is conserved, presumably linear transformations of a fractal transformation are indeed fractals. Here are some of the results for different kernels and number of seeds.