Finding Interesting Fractals

The fractal generator I posted visualizes sin(z)*c type fractals, where c is some constant. The constant c is actually where all the action happens, because if you choose the wrong c, you get a very boring fractal (as I noted on the project, the c value for the fractal I posted came from Paul Bourke). The difficulty of finding these constants gave me a new idea, use the fractal generator to find interesting constants. So here is my fractal finder algorithm:


1. Specify a sample fractal area, such as 10 x 10 pixels
2. Select a minimum and maximum range for the constant
(real and imaginary parts)
3. Loop over every possible constant in this range and
process the 10 x 10 fractal
4. Record the activity of the generated fractal
5. Display constants with activity greater than some
threshold

So “activity” should probably be defined better. I didn’t want to get crazy and calculate the true sobel-style activity in the image, because this would take forever to process a large number of fractals. Instead, since the actual output for each pixel is in the range [0, 255], I stored a count of these values into an array of 255 elements. So if the value 15 comes out once, array[15] is incremented. As each fractal is processed, the activity of the fractal is the number of array elements greater than zero.

One problem with this method is that all elements in the array could have a value of 1, while all the true activity takes place in array[255]. Also, with an array of 10×10 (which I’ve been using for testing), the maximum possible activity is 100. Although, this could easily be resolved by using a larger sample size, say 16×16.

I’m still playing with this, but I’ll post the code soon.

Tagged Tags: , , on August 21, 2008 at 8:20 pm

Leave a Reply