Introduction
The "NewtonRaphson" method is an algorithm for finding the roots of
differentiable equations. See
Wolfram
or
Wikipedia
It can be used to generate fractal images like these.
Update 2 (March 2015):
The WebGL version now has an animation option.
You can use this to incrementally change some of the parameters of the equation and watch how
the pattern evolves.
Update (March 2015):
I now have a WebGL version of the Newton Fractal drawer.
This has a few disadvantages over the Native Client version, You can't zoom in as far and if you try to create
very large detailed pictures the graphics card times out. However for normal use it is much faster, so for a reasonable
image size and number of iterations you can use it in real time. It also works in a wider range of browsers
without having to tweek the browser settings.
I haven't written up the instructions yet, but they are similar to those of the
WebGL Mandelbrot program.
This native client version should still run, so long as your browser
is Chrome and you've set all the flags to the correct values. If you have had this working in the past and
it no longer works the new magic setting is
chrome://flags/#enablenacl
which enables native client for nonAppStore applications.
You can try it (and some other native client applications) here.
Some of the images drawn with these applications are shown below.
If you only want to solve polynomials, rather than draw pictures, then visit the polynomials page.
The Patterns
The images in this section were drawn using the python script (no longer available).

This image shows a situation where the iterations converge on a cycle of 2 points. It is generated using the string
"e1,2.55,0,1 s1280x1024 i6000 b30 fpic1 l20 c.866,0 m7", which I will explain fully when I publish the application.
For now it indicates that we are looking at the polynomial
"x32.55x21 = 0 around the
point (0.866,0). The attractors are: Point attractor at (0.0691821081964128  0.605959771012239i)
Point attractor at 2.68836421639283
Point attractor at (0.0691821081964128 + 0.605959771012239i)
Divergent attractor, limit = 1E+20
Cyclic attractor: 2 points
[0] 0.889861407221087
[1] 0.180352088426774


The basic Newton Raphson equation can be modified by adding in a sort of damping factor, called 'a',
see the "Generalisation" section on the
Wikipedia page. In my code I call this "alpha". If you perform the calculations keeping the
seed point constant and varying 'a' you can get patterns like the one on the left, showing the behaviour of the
simple cubic x3 = 1 with the seed value (0.1,0).
This calculation only converges when 'a' is in the circular region of radius 1 centered on the point
(1,0). In the image the area outside this region is shaded grey. The white region inside this circle is
the region where the calculations didn't converge. See the next image for more on this.


I believe that the points in the white region of the previous image would converge given time, but they have instead been
identified as converging on cycles. This is a useful feature of the application as it greatly speeds up the calculations
in these slowly converging regions. My guess is that the convergeance follows a very slowly shrinking spiral,
which looks to the code like loops, I may investigate this at a later date.
The image on the left is the same calculation as in the previous image
(x3 = 1)
but this time these nonconvergent
points have been assigned colours according to the size of the loops they converge on. These colours
as assigned at random, so I can't identify which colour corresponds to which loop size.


This next image zooms in on the region towards the top right of the previous image, it is centered on the
point 'a' = (1.81,0.39). I've included this because I like it, especially as you can see some
interesting structure in the "cyclic" region to the right of the image.
The application parameters are "e1,0,0,1 s1280x1024 i60000 b120 fpic1 l20 z0.1,0 m40 tA c1.81,0.39 xI".
The cyclic colours are assigned randomly so you probably won't get exactly the same image.


In this "Alphamap" version, if you choose as you seed point a value that doesn't converge on
a root in the standard version, then you can find non convergent regions that look like the
Mandelbrot set.
This one was generated using "e1,2.55,0,1 s1280x1024 i6000 b60 fpic1 l20 z0.866,0 m30 tA c1,0"
which uses the same polynomial as in the first image:
"x32.55x21 = 0, with
the seed point (0.866,0) and is centered around 'a' = (1,0).
Note that the Mandelbrot isn't perfect, the amount of corruption depending on the value of the seed point.
There is probably a value that produces a perfect image but I haven't worked out what it is.

Bestiary
This section catalogs some of the common patterns. There are two columns, the first shows the standard iteration
performed over different seed values, the second shows a example of the corresponding "alphamap", formed
by varying the 'α' parameter in the iteration
Zn+1 = Zn− αF(Zn) ⁄ F'(Zn)
while keeping the seed point constant.

