Fractals
Are
Cool
Fractals in Computing
Computers are incredibly well-equipped for fractals. Why? Because fractals repeat so much! If there’s one thing computers know how to do, and how to do well, it’s repeat a set of instructions over and over and over.
Exhibit A:
The most famous fractal is by far the Mandelbrot set, named after the man who coined the term ‘fractal.’ To create this design, take a point in the real-imaginary plane (meaning it partly exists, and partly doesn't exist. Really cool implications there) and multiply it by itself.
Forever.
If it gets to infinity, then it’s outside the set - let’s color it a shade of blue to yellow based on how fast it got there. But what about if it caves in and never gets there? Then it’s inside the Mandelbrot set and we’ll leave it black.
Take a Look at That
What you end up with is a beautifully abstract rendering of blobs. But as you zoom in on parts of it, the cool factor ramps up to 11! It twists and swirls, splits and explodes into hair-like fractures. And if you zoom in far enough the thing implodes on itself and creates a Mandelbrot set within a Mandelbrot set.
The Dragon Curve
Another popular fractal is called the Dragon Curve. It’s created from an infinite list of 1s and 0s that the computer treats as instructions to ‘turn left’ or ‘turn right’ as it draws lines. It generates this list by starting with a short list of 1s and 0s and reading it backwards. Starting from the end, if it reads a 1, it’ll add a 0. If it reads a 0, it’ll add a 1. When it reaches the beginning of the list it goes to the back of the whole list (including the digits it added) and begins reading again: 1 adds a 0, 0 adds a 1, until you tell it to stop or just go insane.
Build a Dragon Curve =>