Occupy Math has done several articles on fractals, but most of these were highly structured. Today we look at a fractal built with random numbers that simulate tie-dye patterns. Lets start with our goal – a really lurid picture!
This is a type of fractal called a random midpoint fractal. The basic structure of this type of fractal is to (repeatedly) divide a line in half and displace the midpoint, where the line is split, by a random amount. The following animation shows five steps of this process.
This type of fractal is used to build virtual landscapes.
The roughness of the resulting fractal is controlled by selecting the variability of the random midpoint displacements. The next natural question is “what is the two dimensional version of splitting a line and moving the midpoint?” You move the point in the center of a rectangle up or down in a way that splits it into four (tilted) rectangles – and then displace the midpoints of those rectangles.
Okay, but where does the tie-dye come from already?
To get tie-dye you map the heights of the landscape onto colors. Here are a few examples with the height component left in.
Stop displaying the height and the tie-dye appears.
It is, of course, possible to select the colors of the tie-dye pretty whimsically, permitting all sorts of different types of virtual “fabric”.
You can shape these fractals to your needs.
One of Occupy Math’s recent articles is titled Evolution Can Do Math That People Can’t. Evolution can also be used to shape random midpoint fractals in a number of ways. Here is an example from one of Occupy Math’s papers that uses evolution to generate a palette of possible landscape features. The following image comes from asking evolution to match an idealized crater – which it can’t do with a midpoint fractal – generating a whole lot of useful near misses.
A big part of mathematics is learning to approximate things. Normally the goal is to get a really good approximation – but Occupy Math’s project for evolving libraries of landscape features does something else with approximation. Since a midpoint fractal cannot exactly match a smooth crater, asking it to do so creates a space with billions of near misses. These, in turn, provide a large collection of different craters. The next crater, for example, isn’t a bad approximation, but it has a blown-out side with “daughter” craters.
This blog has been about pretty pictures, but it raises a couple of important points. Once we have a nice class of fractals — like random midpoint fractals — it is possible to take them to new places with both mathematical analysis and tools like digital evolution. Knowing math permits you to do more with the interesting things you encounter. The second point is that failure is a useful tool. The craters in this post are all failures, the result of asking an algorithm to do something impossible. Looking at what happens when you try to do something impossible is a useful research tool.
Occupy Math hopes that you have enjoyed this tour through yet another type of fractal. Suggestions and pointers to types of fractals Occupy Math is not yet aware of are quite welcome. For one thing, once he gets it in his clutches, Occupy Math can come up with new versions of new fractals. Do not be shy about commenting or tweeting topics you want to see more of, be they fractals, weird math, or great math people.
I hope to see you here again,
University of Guelph,
Department of Mathematics and Statistics