# Attractor
The attractor
of a point
within a hyperbolic component of period
consists of
points, each satisfying:
Applying Newton’s method in one complex variable:
A reasonable starting guess for Newton’s method is
.
# 1 C99 Code
#include <complex.h>
double _Complex m_attractor
(double _Complex w0, double _Complex c, int p, int n)
{
double _Complex w = w0;
for (int m = 0; m < n; ++m)
{
double _Complex z = w;
double _Complex dz = 1;
for (int i = 0; i < p; ++i)
{
dz = 2 * z * dz;
z = z * z + c;
}
w = w - (z - w) / (dz - 1);
}
return w;
}
# 2 Examples
,
:
,
: