Strange attraction

fractals again…

If chaos theory applies to this blog, then fractals are definitely among its strange attractors… Reading an article about ‘renormalizing’ iteration escape values persuaded me to focus on colorizing fractals once more. The article presents a simple method for calculating real iteration escape values (i.e. C++ floats instead of integers).

With integer escape values, the number of available colors is limited by the algorithm’s  maximum number of iterations (maxIter), whereas the escape values from the descibed method are real numbers in the [0, maxIter) range, so if you want to color a fractal using n*maxIter colors, you can just muliply all escape values by n and use their integer part as an index for your color array. In exchange for just two extra iterations per pixel, fractal images will often look better, especially for small maxIter values.

The pictures show both methods, applied to the Mandelbrot fractal on a 480×320 display.

Integer escape values (maxIter = 128; 128 colors):


Renormalized float escape values (maxIter = 128; 256 colors):

[zooming-in caused some frequency interference between display and camera]


And this picture shows Julia in her new ‘renormalized’ dress:


Here’s the relevant function taken from my ‘Mandelzoom’ sketch that now uses 256 colors, although maxIter is still set to 128.