# finding the periods of miniships in the Burning Ship

The Burning Ship fractal is similar to the Mandelbrot set, only instead of being defined by a complex quadratic polynomial, it can defined by two real functions: \begin{aligned}X &\leftarrow X^2 - Y^2 + A \\ Y &\leftarrow 2|XY| + B\end{aligned}

Similarly to the Mandelbrot set, which contains smaller copies of itself adorned with filaments, the Burning Ship fractal contains smaller miniships. These occur due to renormalization, where a periodic cycle exhibits dynamics over one period similar to the main body of the set over one iteration.

The question is, given a simple region in the complex plane (something like a square or a circle), what is the period of the lowest-period miniship contained within the region?

Bonus points for methods that are applicable to a more general class of fractals, not just the quadratic Burning Ship.

For the quadratic Mandelbrot set I know two methods, one using the Jordan curve theorem iterating the corners of a polygon until it surrounds the origin, the first iteration at which that happens is the period; the other uses Taylor series ball arithmetic, which I don't fully understand, but is better than naive ball arithmetic. Implementations can be found here: box, ball. I believe neither can be applied to the Burning Ship because its functions aren't well behaved enough.

I have attempted to use ball arithmetic (midpoint-radius intervals, one real ball each for $X$ and $Y$) to solve this problem, but failed miserably - it more easily finds nearby "outer" miniships outside the region visible at shallower zoom levels than "inner" ones within the region at deeper zoom levels. One has to zoom in a great deal further to reduce the region of interest, before it finds the desired period. Perhaps my lack of special treatment of $|\cdot|$ and $\cdot^2$ was to blame? (I followed the simple abs from arblib, and used regular multiplication, which is also used in arblib as far as I can tell.)

I have also attempted to use the box method, simply continuing in the cases where the polygon gets folded when it crosses an axis (this may lead to a higher or lower period than the true one being found by the algorithm). It seems to work a lot better than the ball arithmetic, though I'm concerned about the folding...

My end goal is an implementation in a fractal browser for accelerating interesting zoom navigation techniques; I already have implemented Newton's root finding method and miniship size estimates, both of which need the period as input.

This is indeed true, so long as your mapping is a continuous mapping; this preserves the topology of the closed loop (i.e. polygon) and ensures that you'll surround the forward-image of the origin if and only if you've iterated $p$ times where $p$ is the period. Burning Ship is defined in terms of the absolute value $f=|x|$ as well as several more familiar continuous functions, so the whole thing is continuous.
So the Jordan curve theorem method works for continuous formulas, with the caveat that folding and other non-linearities may need the polygon to be subdivided (for example when an edge crosses an axis and would be folded/bent by $|\cdot|$) so that the topology remains the same.