Bailey { ; ;Bailey is method for solving ecuations similar to Newton ;It usualy requires less iterations, but the formula used is a bit more difficult. ;On the average the time needed to reach a solution should be quite similar for both methods. ; init: z = pixel complex f complex fp complex fs loop: zold = z f=z^@p1 - @r fp=@p1*z^(@p1-1) fs=(@p1-1)*@p1*z^(@p1-2) z=z - f/(fp-(f*fs/2/fp)) bailout: |z - zold|/|z| >= @bail default: title = "Bailey" maxiter = 100 param p1 caption = "Exponent" default = (3,0) hint = "Specifies the exponent of the equation that is solved by \ Bayley's method. Use real numbers (set the imaginary component \ to zero) to obtain classic Newton fractals." endparam param r caption = "Root" default = (1,0) hint = "Specifies the root of the equation that is solved. Use larger \ numbers for slower convergence." endparam param bail caption = "Bailout" default = 0.00001 hint = "Bailout value" endparam } Newton { ;Just a tipical Polinomial Newton fractal ;the polinom goes up to the 10th power coeficients. global: init: complex oldz=9999999 complex z=#pixel complex f complex fp loop: oldz=z f = @a0*z^0 + @a1*z^1 + @a2*z^2 + @a3*z^3 + @a4*z^4 + @a5*z^5 + @a6*z^6 + @a7*z^7 + @a8*z^8 + @a9*z^9 + @a10*z^10 fp = @a1*z^0 + 2*@a2*z^1 + 3*@a3*z^2 + 4*@a4*z^3 + 5*@a5*z^4 + 6*@a6*z^5 + 7*@a7*z^6 + 8*@a8*z^7 + 9*@a9*z^8 + 10*@a10*z^9 z=z-(f/fp) bailout: |z-oldz|>@bail default: title = "Newton" float param bail caption="bailout" default=0.0000001 endparam float param a0 caption="a0" default=0 endparam float param a1 caption="a1" default=0 endparam float param a2 caption="a2" default=0 endparam float param a3 caption="a3" default=0 endparam float param a4 caption="a4" default=0 endparam float param a5 caption="a5" default=0 endparam float param a6 caption="a6" default=0 endparam float param a7 caption="a7" default=0 endparam float param a8 caption="a8" default=0 endparam float param a9 caption="a9" default=0 endparam float param a10 caption="a10" default=0 endparam }