Friday, July 24, 2009

Burning Ship Fractal

Just happened to discover this while browsing Wikipedia last night. It's a very cool fractal called the Burning ship fractal. The mathematical definition of it, rendered in Tex (thank you Wikipedia) is:

z_{n+1} = (\operatorname{Re} \left(z_n\right)+i\operatorname{Im} \left(z_n\right))^2 + c, \quad z_0=0


What this means, in simple terms, is the following. Start with the first number, z0, as 0+0i. Then repeat this loop:
1)Add the absolute value (distance from 0) of the real part (the non-imaginary part) to the absolute value of the imaginary part (the part with the i).
2) Square the sum.
3) Add an arbitrary (I think) constant, c.
4) Plot the resulting point on a graph of the complex plane, with color showing how many iterations it takes to reach an arbitrary large number.

The imaginary part can be subtracted instead of added; this produces a more clear image of the 'burning ship':

The picture is smaller because it loads slow; for the full desktop-sized beauty, click the picture.

The burning ship fractal is similar to the Mandelbrot set, except for the absolute value function that induces the assymetry. It is an example of a complex quadratic polynomial.

No comments: