Both Apophysis and Chaotica creates a style of fractal called a fractal flame.
A fractal flame is a form of generated art created by an iterated function system. The name might sound scary, but once I stop using big words and start showing pictures, it becomes much easier to understand what is going on.
There are two methods for creating fractal flames.
I love each of these methods. They are mathematically fascinating, they let me get into all sorts of interesting and artistic philosophical debates about order versus chaos, and I I am fascinated by the way these two wildly different methods create exactly the same result.
Let me repeat that: both of these methods create exactly the same result.
By the end of these two tutorials, I hope to infect you with the same level of awe and excitement that I feel when considering these two methods. Or, if you don’t share the awe, at least you'll get an inkling as to exactly why I think iterated function systems are amazing.
The first method is called the Multiple Reduction Copy Machine algorithm.
Part of the reason it's called that is that you could literally do this method on a physical copy machine with enough paper, time, and nobody breathing down your neck about wasting ink, paper, or time.
As you'll see in this tutorial, this method is extremely organized, very systematic, and very slow.
It's biggest advantage is also the reason why I put this tutorial first: when I was starting out, I thought it was the easiest way to visualize what was going on when designing a flame fractal.
The second method is called the Chaos Game, and it is extremely disorganized, completely chaotic, and extremely fast.
It's biggest advantage is its speed, which is why both Apophysis and Chaotica use it instead of the Multiple Reduction Copy Machine method to create fractals.
However, a lot of people like me, when they first encounter the chaos game, become confused about how it could possibly work. That was the case when I started out, so I taught myself the Multiple Reduction Copy Machine method first. And that's why I am teaching it first to you.
That being said, both methods create exactly the same result.
So what is the multiple reduction copy machine method? Allow me to demonstrate.
When operating a copy machine, it helps to have something to copy. Above, I'm making a random black squiggle on a white background so that I have something to copy.
In the above, I am running the original drawing through a copy machine. That copy machine shrinks the image down by half and moves it to the lower left corner of the white square. This shrinking and moving is called a transformation.
Since this is the multiple reduction copy machine method, it's time to build up the second copy machine. This one makes a copy of the original drawing, shrinks it, and place is it in the upper left hand corner of my square.
With this multiple reduction copy machine method, I have taken my original drawing and run it through three reduction copy machines. I am left with three smaller copies of my original drawing arranged in a triangle.
So are multiple reduction copy machine has created three copies and deleted the original. These three copies form a new image. What if we took that new image and ran it through the multiple reduction copy machine again? And again? And again?
This creates a fractal called Serpinski's Triangle.
#Part 2: The Chaos Game!
So this is how Fractal flames are made...kind of. Sort of. While, in theory, you could make a fractal this way, no program ever does. Because it's slow. Slow enough that for certain fractals, the universe would end before you got a likeable result. The key bit about the above method is that it is very ordered. It is extremely easy to see, after a couple of steps, things are going. There's nothing chaotic about it at all. Not so with the Chaos game.
But let's see what sort of fun we can have with the multiple copy reduction machine- and take it apart- and magically metamorphose it Until, like a caterpillar turning into a butterfly, It becomes the mysterious, much admired and very badly understood Chaos Game.
As we saw from the animations above, you can start with anything. You can start with a squiggle. You can start with a triangle. You can start with an abstract mountain. You can even start with a dot!
What if I start with some numbers? These numbers are veeery interesting. Let me illustrate they are interesting!
If I copy those numbers, just like I copied every other image, I will get the serpinski's triangle, like usual. But...let's look at each step! The first step divides the triangle into three zones: zone 1, zone 2, and zone 3 So...what If I said "Im interested in zone 2?" I highlight that in red.
I descide to say what zone I picked at the bottom. I picked zone 2, so I put the nubmer 2 at the bottom of the image, all the way to the left.
Now, on the second step, let's look into zone 2. It is also divided into three zones. I've decided, why not? Let's higlight that 1 in zone 2. And go to the bottom and stick a one right next to the 2.
So, on each step, each zone gets subdivided into three other zones. And I just pick one...whichever one I fancy. And at the bottom, I keep a record of whatever zone I picked. This is getting a trifle confusing...so let me picture it a different way:
The largest number is the first number, the second largest number is the second number, the third number is the third number, and so on... 21322
So...I've been shrinking numbers, and I've been shrinking images...but what if I just started with a point?
Ok, the point, unlike the number, is staying the same size. Why? Because numbers shrink, but mathematically a point is just a dot. You can't change the size of a dot. So there's no point in 'shrinking' it.
and...let's get rid of the points and just keep the last one. And, hey! That point landed right on the serpinki's gasket. And right in the place I expected it to, based on the location scheme from this image:
Great. So I've sucessfully stuck one point on the Serpinski's triangle. What If I stick a couple more points on it?
Ok, now let's line all three of these up side by side, and I can see that i have three points. in three different places on the triangle.
What If I stuck those three points on the same image?
Ahah! And now, we see that I didn't just pick those three location by accident.
Look at those location codes.
To make a new location code, I dropped the right-most number and added a new number to the left. Remember how, the left most digit is the biggest, and the right one is the smallest? The left number has the biggest influence on the locaion of the point, and the right one has the smallest.
You can see this illustrated here:
So...how do I pick which transform to add? How do I pick the next big thing to tack onto the left side? WITH CHAOS! RANDOMLY! We have now gotten to the bit where we've turned into the chaos game! I know that I can represent every point on my 'fractal space' with a five digit 'location code' sort of like a postal 'zip code.' I I just stick the numbers 1, 2, 3 in a hat, and pull one out to see what transform I should stick on the left hand side next.
Every time I apply a transform I draw a dot The thing about drawing these numbers random Is that it's like one giant long tape, But that tape will include every five digit location code on the fractal Which means that my traveling point will visit every location code on the fractal It'll bounce around a lot, sure, it'll bounce around reaaallly chaotically but it will always end up visiting every location as long as you give it enough time. And as long as I draw a dot at the location it visited I will have drawn the fractal! https://user-images.githubusercontent.com/1163925/117889521-4d252900-b279-11eb-8760-e4643446fa56.gif And that is how you can turn this very top-down, orded method of making a fractal-
Into a system where you ricochet around from location to location like a hyperactive toddler, https://www.youtube.com/watch?v=IGlGvSXkRGI
And still end up with exactly the same result Except everyone uses the toddler. Why? Because the toddler is faster.
A lot faster.
So yes, you could do things in a very top-down, heirarchical, ordered way- a way that works, and is also very slow....
Or you could do things completely chatoically, but following a couple fo simple rules, and get the same exact result- but faster. And that's how you can transform a slow, orderly algorithms in to a quick, chaotic algorithm.
And that is how fractals are made.