Jump to content

Newton fractal

From Wikipedia, the free encyclopedia
Fatou sets (blue, red and green) and Julia set (their boundary) for the rational function associated to Newton's method forf(z) =z3− 1.

TheNewton fractalis aboundary setin thecomplex planewhich is characterized byNewton's methodapplied to a fixedpolynomialp(z) ∈[z]ortranscendental function.It is theJulia setof themeromorphic functionzzp(z)/p′(z)which is given by Newton's method. When there are no attractive cycles (of order greater than 1), it divides the complex plane into regionsGk,each of which is associated with arootζkof the polynomial,k= 1,…, deg(p).In this way the Newton fractal is similar to theMandelbrot set,and like other fractals it exhibits an intricate appearance arising from a simple description. It is relevant tonumerical analysisbecause it shows that (outside the region ofquadratic convergence) the Newton method can be very sensitive to its choice of start point.

Almost allpoints of the complex plane are associated with one of thedeg(p)roots of a given polynomial in the following way: the point is used as starting valuez0for Newton's iterationzn+ 1:=znp(zn)/p'(zn),yielding a sequence of pointsz1,z2,…,If the sequence converges to the rootζk,thenz0was an element of the regionGk.However, for every polynomial of degree at least 2 there are points for which the Newton iteration does not converge to any root: examples are the boundaries of the basins of attraction of the various roots. There are even polynomials for which open sets of starting points fail to converge to any root: a simple example isz3− 2z+ 2,where some points are attracted by the cycle0, 1, 0, 1…rather than by a root.

An open set for which the iterations converge towards a given root or cycle (that is not a fixed point), is aFatou setfor the iteration. The complementary set to the union of all these, is the Julia set. The Fatou sets have common boundary, namely the Julia set. Therefore, each point of the Julia set is a point of accumulation for each of the Fatou sets. It is this property that causes the fractal structure of the Julia set (when the degree of the polynomial is larger than 2).

To plot images of the fractal, one may first choose a specified numberdof complex points(ζ1,…,ζd)and compute the coefficients(p1,…,pd)of the polynomial

.

Then for a rectangular lattice

of points in,one finds the indexk(m,n)of the corresponding rootζk(m,n)and uses this to fill anM×Nraster grid by assigning to each point(m,n)a colorfk(m,n).Additionally or alternatively the colors may be dependent on the distanceD(m,n),which is defined to be the first valueDsuch that|zDζk(m,n)| <εfor some previously fixed smallε> 0.

Generalization of Newton fractals

[edit]

A generalization of Newton's iteration is

whereais anycomplex number.[1]The special choicea= 1corresponds to the Newton fractal. The fixed points of this map are stable whenalies inside the disk of radius 1 centered at 1. Whenais outside this disk, the fixed points are locally unstable, however the map still exhibits a fractal structure in the sense ofJulia set.Ifpis a polynomial of degreed,then the sequenceznisboundedprovided thatais inside a disk of radiusdcentered atd.

More generally, Newton's fractal is a special case of aJulia set.

Serie:p(z) =zn- 1

Other fractals where potential and trigonometric functions are multiplied.p(z) =zn*Sin(z) - 1

Nova fractal

[edit]

The Nova fractal invented in the mid 1990s by Paul Derbyshire,[2][3]is a generalization of the Newton fractal with the addition of a valuecat each step:[4]

The "Julia" variant of the Nova fractal keepscconstant over the image and initializesz0to the pixel coordinates. The "Mandelbrot" variant of the Nova fractal initializescto the pixel coordinates and setsz0to a critical point, where[5]

Commonly-used polynomials likep(z) =z3− 1orp(z) = (z− 1)3lead to a critical point atz= 1.

Implementation

[edit]

In order to implement the Newton fractal, it is necessary to have a starting function as well as its derivative function:

The three roots of the function are

The above-defined functions can be translated inpseudocodeas follows:

//z^3-1
float2Function(float2z)
{
returncpow(z,3)-float2(1,0);//cpow is an exponential function for complex numbers
}

//3*z^2
float2Derivative(float2z)
{
return3*cmul(z,z);//cmul is a function that handles multiplication of complex numbers
}

It is now just a matter of implementing the Newton method using the given functions.

float2roots[3]=//Roots (solutions) of the polynomial
{
float2(1,0),
float2(-.5,sqrt(3)/2),
float2(-.5,-sqrt(3)/2)
};

colorcolors[3]=//Assign a color for each root
{
red,
green,
blue
}

Foreachpixel(x,y)onthetarget,do:
{
zx=scaledxcoordinateofpixel(scaledtolieintheMandelbrotXscale(-2.5,1))
zy=scaledycoordinateofpixel(scaledtolieintheMandelbrotYscale(-2,1))

float2z=float2(zx,zy);//z is originally set to the pixel coordinates

for(intiteration=0;
iteration<maxIteration;
iteration++;)
{
z-=cdiv(Function(z),Derivative(z));//cdiv is a function for dividing complex numbers

floattolerance=0.000001;

for(inti=0;i<roots.Length;i++)
{
float2difference=z-roots[i];

//If the current iteration is close enough to a root, color the pixel.
if(abs(difference.x)<tolerance&&abs(difference.y)<tolerance)
{
returncolors[i];//Return the color corresponding to the root
}
}

}

returnblack;//If no solution is found
}

See also

[edit]

References

[edit]
  1. ^Simon Tatham."Fractals derived from Newton–Raphson".
  2. ^Damien M. Jones."class Standard_NovaMandel (Ultra Fractal formula reference)".
  3. ^Damien M. Jones."dmj's nova fractals 1995-6".
  4. ^Michael Condron."Relaxed Newton's Method and the Nova Fractal".
  5. ^Frederik Slijkerman."Ultra Fractal Manual: Nova (Julia, Mandelbrot)".

Further reading

[edit]