Your browser does not support HTML5 Canvas. Your browser does not support HTML5 Canvas.

Fixed points and self-similarity

In the past, I’d always viewed Julia set fractals as being about iteration, rather than being a fixed point of a transform. They’re the initial zs for which z → z^2 + c does not diverge, for whichever c the current Julia set represents.

However, when constructing this I was thinking of finding a way of representing the z^2 + c transformation as a continuous deformation. Doing this makes it easier for me to think of the set as a fixed point of the transformation (presumably the largest compact fixed point of the transform, or something like that). I think seeing the effects of the z^2 transform on the sets graphically is rather fun.

By looking at the Julia sets as a self-similar structure under some non-linear transformation (specifically one involving z → z^2), it’s easier to see how it relates to other fractals such as the Sierpinski triangle.

The relationship between Mandelbrot and Julia sets

The Mandelbrot set represents what happens if you iterate z → z^2 + c starting at z = 0 for all the different cs in the complex plane. In other words, it’s a representation of all the Julia sets for which the origin is in that Julia set. You can see this by moving the mouse around and as it crosses the Mandelbrot set boundary the Julia set breaks apart at the origin.

However, we can start the Mandelbrot iteration at a point other than the origin. What you then get is an image representing the set of Julia sets where that particular point is in those sets. This produces a distorted Mandelbrot set which looks quite normal near the origin, and gets weirder as you move away. You can see this by holding down the ‘shift’ key as you move the mouse around.

The inspiration for all this

The idea of demonstrating the iterative function as a continuous deformation had been kicking about my head for some time. However, the side-by-side representation of Mandelbrot and Julia sets was something I first saw in an IOCCC entry which used low-level X calls.

I think it says something about the march of progress that the same thing can now be done with non-optimised code in a high-level language inside a web browser on a seven year old laptop without really breaking a sweat. Times have changed!

If you're wondering about all that slow pre-computation, that's not to actually do the iterative steps or the like. That's just to generate look-up tables to make the click animation fast. The animation involves a lot of conversion between Cartesian and polar coordinates. I'm sure there are plenty of optimisations I could do, but this was supposed to be a quick project!

Last updated 7 May 2015. Mail me at random.user@arbitrary.name.