Mar 30, 2009

Discovering Fractals: The Julia Set

After my post yesterday about the Mandelbrot set I started digging around a bit more. I discovered this other thing called a Julia set, which is something similar.

It still uses this formula:
zi+1 = zi + c
However where Mandelbrot set started with z0 = 0 and c as the coordinates of the pixel, the Julia set has z0 as the coordinates of the pixel and c as some number. Depending on the c that you pick, you end up with a different picture.

I also looked into colouring it a bit better than black and blue, it is now based on HSV colours instead of RGB. Then if the formula escapes your radius at iteration i, you set the hue of the pixel to (i+b) mod 360 where b is some offset you can choose to change your colour scheme. With b = 0 you get a bright orange background, but I didn't really like it so I picked b = 180 which gives a nice lightish blue background. Unfortunately I'm not completely liking the bright pink/purple of the swirls, anyone know a few things about colour theory and have suggestions?

Here it is centred at 0.35 - 0.33i, with 4x zoom and c = (φ - 2) + (φ - 1)i, φ being the golden ratio:

1 comment:

lili said...

too bad you can't post the totally cool psychedelic video of it changing colours