Archive for the ‘fractals’ Category

Adjusting the branch cut

Saturday, September 13th, 2008

The second image in this post was quite popular, so I decided to make a movie out of it.

There aren’t really many parameters in the equations used to make this image, though – (the functions are just negative, exponential and logarithm). The colouring is arbitrary but modifying it wouldn’t make a very interesting movie. The zoom factor is fairly arbitrary as well but zooming very much in or out would make the image take much longer to render (besides which, zooming movies have been done to death). About the only other arbitrary thing about the image is the choice of branch cut for the logarithm.

This describes a way of adjusting the branch cut in a continuous way, and this is the movie I made by adjusting theta from -4.5 to +4.5 radians:

High quality 640×480 11Mb DivX avi version.

This took about three days to render. I could have done it faster, but my laptop gets uncomfortably warm when both its cores are fully utilized. Also, a problem with Vista networking was causing the other machine I was using to keep getting disconnected from my laptop every few frames.

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Triangular lattices

Monday, September 8th, 2008

A commenter wondered what the images on Saturday’s post would look like using a sixth root of unity instead of a fourth. I am happy to oblige. With ω=eπi/3, this is the image with the operations z+ω, ωz, ωz:

w^z

And this is the image with the operations z+ω, ωz, zω:

z^w

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Powers involving i

Saturday, September 6th, 2008

More variations:

Red: z->z+i
Green: z->iz
Blue: z->iz:

i^z

Same, but with blue: z->zi:

z^i

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Reslicing

Friday, September 5th, 2008

A movie can be thought of as a three-dimensional array of pixels – horizontal, vertical and time. If you have such a three-dimensional array of pixels, there are three different ways of turning it into a movie – three different dimensions that you can pick as “time”. For movies of real things this probably isn’t a very interesting thing to do, but for movies of mathematical objects like the one I made yesterday, there may be mathematical insights to be gained from “reslicing” a movie.

So, here is yesterday’s movie with the x and time coordinates swapped:

Higher resolution version (8Mb 640×480 DivX).

And here it is with the y and time coordinates swapped (and also rotated to landscape format):

Higher resolution version (8Mb 640×480 DivX).

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

I made a movie

Thursday, September 4th, 2008

Higher quality 10Mb 640×480 DivX version here.

This is a generalization of the second picture from yesterday’s post, varying the coefficient of i from e-4.5 to e4.5. It also demonstrates how this picture is related to the third picture from Monday’s post.

1.35 trillion points were calculated to make this movie, taking 4 CPUs with 6 cores most of a day (it was going to take nearly 4 days, but I decided to use most of the other computers in the house as a render farm).

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Two more

Wednesday, September 3rd, 2008

Square roots

Generated by a program similar to the last two pictures on Monday’s post, but the functions are +sqrt(z), -sqrt(z) and 1+z. Don’t plot a point if the last operation was 1+z, and colour points according to the operation used 5 iterations ago.

Golden ratio

Similar to the third image on Monday’s post, but when we multiply by i we also multiply by the golden ratio (1+sqrt(5))/2 = 1.618… Most the rectangles you see in this image are golden rectangles, which are supposedly the most aesthetically pleasing.

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Fourier transform of the Mandelbrot set

Sunday, August 31st, 2008

I wonder what the Fourier transform of the Mandelbrot set looks like? More specifically, the 2D Fourier transform of the function f(x,y) = {0 if x+iy is in M, 1 otherwise}. This has infinitely fine features, so the Fourier transform will extend out infinitely far from the origin. It’s aperiodic, so the Fourier transform will be non-discrete.

The result will be a complex-valued function of complex numbers (since each point in the frequency domain has a phase and amplitude). That raises the question of its analytical properties – is it analytic everywhere, in some places or nowhere? (Probably nowhere).

Other interesting Mandelbrot-set related functions that could also be Fourier transformed:
M_n(x,y) = the nth iterate of the Mandelbrot equation (f = |exp(-(lim(n->infinity) M_n)/n)|).
D(x,y) = distance between x+iy and the closest point in the Mandelbrot set. Phase could also encode direction.
P(x,y) = the potential field around an electrically charged Mandelbrot set.

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Simplicity density function

Friday, August 29th, 2008

A commenter on Tuesday’s post wondered what the density function of numbers with low complexity looks like. This seemed like an interesting question to me too, so I wrote some code to find out. This is the result:

Simplicity density function

I actually used a slight modification of the complexity metric (L(exp(x)) == L(-x) == L(log(x)) == L(x)+1, L(x+y) == L(x)+L(y)+1, L(0) == 1) and a postfix notation instead of a bracketing one. These are all the numbers x with L(x)<=20. More than that and my program takes up too much memory without some serious optimization.

The smooth curves and straight lines are functions of the real line (which is quite densely covered). The strong horizontal lines above and below the center (0) lines are +πi and -πi, which occur from taking the logarithm of a negative real number. There is a definite fractal nature to the image and lots of repetition (as one would expect, since every function is applied to every previously generated point up to the complexity limit).

I didn’t add duplicate elimination rules for duplicates that didn’t appear until L(x)>=8 or so, so some points are hotter than they should be, but I don’t think fixing this would make the image look significantly different.

The code is here. This header file is also required for the Complex class, and this in turn requires this and this. The program is actually a sort of embryonic symbolic algebra program as it builds trees of expressions and pattern matches strings against them. It generates a 1280×1280 RGB image which I cropped down to 800×600. The colour palette is based on a thermal spectrum where temperature goes as an inverse seventh root of the number of hits on a pixel (no particular mathematical reason for that – I just think it makes it look nice). The points between black and red are fudged a bit.

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Overlapping images in escape time fractals

Tuesday, July 15th, 2008

This is a post I made on sci.fractals recently (it didn’t get any replies there though).

I’ve been playing about with drawing escape time fractals using different formulae. I’ve noticed that some formulae give images which seem to have a strange feature – in some places it looks like there are two overlapping images, with one image showing through in areas of the other.

For example, here is an image I made using the formula
z <- (z+1)*(z+c)*(z+i)

Can anybody help me to understand what is going here? Are there really two iterative process going on hidden in one formula or is it an illusion? Does this phenomenon have a name that I could search for to find out more about it?

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark

Use derivatives for SOI

Sunday, June 15th, 2008

This is an elaboration on a point from an earlier blog post.

Synchronous orbit iteration is a way of speeding up the calculation of fractals. The idea comes from the observation that the orbits of nearby points follow similar trajectories for a while. So one can take a rectangular array of points and subdivide them once a rectangular array no longer approximates them
well.

It seems to me that a better way to do this might be to compute some the derivatives of the iteration function and iterate them instead of a grid of points, for the same reason that the accuracy of numerical integration is usually better improved by switching to a higher-order method than by decreasing the step size.

This method simplifies the algorithm which determines whether to subdivide or not (just see if the magnitude of the highest derivative exceeds some limit, rather than looking for rectangularity – which amounts to the same thing for the second derivative).

It’s also even easier to subdivide – instead of interpolating to find the intermediate iteration points, just evaluate the Taylor series.

Of course, I’ll need to do some experiments to determine if this is truly a better method (at the moment there are some more fundamental changes that my fractal plotter needs before I can play with this sort of thing). As far as I can tell nobody’s ever tried it before, though. Classical SOI is difficult enough to get right.

  • Reddit
  • Digg
  • Facebook
  • StumbleUpon
  • Twitter
  • Delicious
  • Share/Bookmark