# # Interior Coordinates Interior coordinates in the Mandelbrot set (2013) derives an algorithm for calculating interior coordinates $$b$$, and it turned out that only periods that are “partials” (corresponding to atom domains) need be considered:

• For each period p, starting from 1 and increasing:
• If $$|F^p(0, c)|$$ reaches a new minimum:
• Find $$z_0$$ such that $$F^p(z_0,c)=z_0$$ using Newton’s method in one complex variable (“attractor”, with initial guess $$F^p(0,c)$$);

• Find $$b =\frac{\partial}{\partial z} F^p(z_0,c)$$;

• If $$|b| \le 1$$ then return $$b$$, otherwise continue with the next $$p$$.

## # 1 C99 Code

#include <complex.h>

double _Complex m_interior_coordinates
(int N, int M, double _Complex c)
{
double _Complex z = 0;
double mz = 1.0 / 0.0;
for (int n = 0; n < N; ++n)
{
z = z * z + c;
double zp = cabs(z);
if (zp < mz)
{
mz = zp;
double _Complex w = m_attractor(z, n, c, M);
double _Complex dw = 1;
for (int m = 0; m < n; ++m)
{
dw = 2 * w * dw;
w = w * w + c;
}
if (cabs(dw) <= 1)
return dw;
}
}
return 0;
}