# Shape Estimate
V. Dolotin and A. Morozov “On the shapes of elementary domains or why Mandelbrot Set is made from almost ideal circles?” (2008) [eq. 5.8] derive a shape estimate \(s\), with derivatives evaluated at \(F^p(0,c)\) where \(c\) is a nucleus of period \(p\):
\[s = - \frac{1}{\left(\frac{\partial}{\partial c}\right) \left(\frac{\partial}{\partial z}\right)} \left(\frac{\frac{\partial}{\partial c}\frac{\partial}{\partial c}} {2 \frac{\partial}{\partial c}} + \frac{\frac{\partial}{\partial c}\frac{\partial}{\partial z}} { \frac{\partial}{\partial z}}\right) \]
\(s \approx 0\) corresponds to cardioid-like shapes. \(s \approx 1\) corresponds to circle-like shapes.
# 1 C99 Code
#include <complex.h>
#include <stdbool.h>
double _Complex m_shape_estimate
(double _Complex c, int p)
{
double _Complex z = c;
double _Complex dc = 1;
double _Complex dz = 1;
double _Complex dcdc = 0;
double _Complex dcdz = 0;
for (int i = 1; i < p; ++i)
{
dcdc = 2 * (z * dcdc + dc * dc);
dcdz = 2 * (z * dcdz + dc * dz);
dc = 2 * z * dc + 1;
dz = 2 * z * dz;
z = z * z + c;
}
return -(dcdc / (2 * dc) + dcdz / dz) / (dc * dz);
}
bool m_shape_is_cardioid(double _Complex s)
{
bool d = cabs(s) < cabs(s - 1);
return d;
}
# 2 Examples
\(c = -0.12256116687665361 + 0.74486176661974424 i\), \(p = 3\): \[s = 1.0212516030641008 + 0.047630153362811116 i \approx 1\]
\(c = -0.15652016683375508 + 1.0322471089228318 i\), \(p = 4\): \[s = 0.058425597199448037 + 0.084498085298473649 i \approx 0\]