Background
This post is motivated by this fantastic video. Here we visualize what’s discussed in that video.
Overview
Tetration operator is based on repeated exponentiation x ^ x ^ ...
. For example:
As we see above, 2^2^2...
grows really quickly and 2 ↑↑ 5
would have way more digits than the number of atoms in the universe! Surprisingly, if you for example plug in 1.1
or 1.2
it ends up converging to some number (1.1 ↑↑ ∞
).
Given a number, we can numerically check if it converges or not by repeatedly doing the exponentiation for say 100 iterations and see if it explodes. Here is an example code in JuliaLang:
Complex Numbers
Now, what if we plug in a complex number? In other words, for what values of c
would c ↑↑ ∞
converge? In order to understand what it means to raise a complex number to the power of another complex number, you can read this article. However, in Julia you can just write c ^ x
and not worry about the implementation!
So, considering x-axis the real component and y-axis the imaginary part, we can try a lot of complex numbers and see how many iterations does it take for a given complex number to explode. We assign a color to each pixel based on the number of iterations it takes to go beyond a certain large number. Finally, we plot it and we get a fractal known as the “Tetration Fractal”. (screenshots at the bottom of this page)
Implementation
We can implement this in JuliaLang in less than 30 lines, and takes a few seconds on a usual laptop to generate an image with 4k pixels.