Secrets of the Burning Ship
The Burning Ship fractal is a variation of the Mandelbrot set, where the absolute value of each component is taken before squaring them, and the imaginary component is flipped.
Z = (|Re(Z)| − i|Im(Z)|)2 + C
Where C is the (x,y) point being tested, expressed as a complex number x + iy. The formula starts with an initial value of Z = 0, and is iterated in the same way as the Mandelbrot set. Points where Z diverges to infinity are outside the set, and points where Z stays bounded in magnitude are inside the set.
Geometrically, the absolute value is a folding operation. Negative values are reflected across the axis to make them positive, folding the negative half of the plane onto the positive half. This is what gives the burning ship its rectangular structure. It mimics an artificial structure, appearing like scaffolding or perhaps the Eiffel Tower.
The concept of folding can be generalized to reflect across anything, even in higher dimensions. The Mandelbox fractal uses 3D folding across a plane.
Secret #1
It's the absolute value of the components of Z, and not the absolute value of the complex number:Z = |Z|2 + C Some sources display this formula, since it looks cleaner, and actually will work in some programming languages (like GLSL), because the abs() vector function operates on the components. However, mathematically it is wrong.
Secret #2
The famous fractal pictured above is actually a smaller ship located near -1.75 on the real axis. It looks more impressive and ship-like than an outer view of the entire fractal!
Secret #3
The commonly written formula for the Burning Ship fractal is upside-down!
Z = (|Re(Z)| + i|Im(Z)|)2 + C
The image is flipped afterward to make the "ship" look upright. In some cases, this happens accidentally. Computer screen coordinates are defined with the origin (0,0) in the top-left corner, and the Y-axis points down, so this formula will actually produce the upright ship image if you implement it by directly drawing to the screen, since it's being flipped twice!
You can verify easily, by hand, that the famous formula is upside-down. Try iterating at the point C = −i
Z1 = |0|2 − i = −i
Z2 = |−i|2 − i = −1 − i
Z3 = (|−1| + |−i|)2 − i = (1 + 2i − 1) − i = i
Z4 = |i|2 − i = −1 − i
This is an orbit, since Z4 = Z2 It will never diverge, so therefore the point −i is inside the set. But it is clearly way below the upright ship!
Instead, positive i is inside the fractal, since that was negative before the image was flipped. However, there is no need for this secret flip operation at the end. Mathematically, this can be expressed beautifully merely by changing the plus sign to a minus sign. This is equivalent to flipping the final image:
Z = (|Re(Z)| − i|Im(Z)|)2 + C
I use this formula, since it's just as clean, and is mathematically correct for the image we want to produce. Here is a proof:
Let s be the sign of the imaginary part. (Either +1 or -1, so s2 = 1)
Z = (|Re(Z)| + si|Im(Z)|)2 + C
= |Re(Z)|2 + 2si|Re(Z)||Im(Z)| − |Im(Z)|2 + C
= (|Re(Z)|2 − |Im(Z)|2)Re(C) + 2si|Re(Z)||Im(Z)|Im(C)
Because the complex squaring operation eliminates the sign of s on the real part of the next Z, it propagates through to negate only the sign of the imaginary part. This proof can be continued inductively to pull s outside of all iterations, to change only the sign of the final imaginary component, which flips the image.
Secret #4
As spectacular as the burning ship is, there are even more details hiding within the fractal set itself. The burning glow is the escape time near the fractal boundary. However, if you graph the trajectory of points within the set, new patterns appear!

(Click to open in the Burning Ship viewer.)
The detail on the largest ship is the most structured and intricate, but every smaller ship has its own internal patterns:
These graphs are produced by the value Z after a finite number of iterations. As the number of iterations approaches infinity, the size of the internal patterns become infinitely small. This is studied mathematically using the Lyapunov exponent, which measures the rate of divergence of infinitesimally close trajectories.
Finally– the question on everyone's mind: Why is the ship burning? What happened to sink it?
My hypothesis regarding its fate involves its proximity to the Mandelbrot set. The equations are nearly identical, so they're both sailing on the same mathematical sea, so to speak.
Now imagine what might happen if the ship collided with one of these:
The Titanic sunk when it crashed into a real iceberg. This is a complex iceberg, and it's infinitely sharp. The ship never stood a chance.
