This is chapter eight of the Beginners Guide to Writing Fractal formulas.
Please do tutorial seven before doing this tutorial.

In preparation Load Ftswitch7m

Click to edit

Create a new instance of Ftswitch7M and call it Ftswitch8M

Create a new instance of Ftswitch7J and call it Ftswitch8J

After some time to play with the formula some things become very
noticable. 

Most obvious is that we need to shut off periodicity checking. You know
this needs to be done by the sudden change in image size when you increase
the maxiteration and the areas of checker board and dots that show up.

After going to the Julia I always had to zoom out to see some images
better. This is a simple scale problem.
I really can't control the diameter of the circles, the resolution, which
is related to the bailout test value and at very deep zooms detail is
gone. And lastly when the switch box opens there is no default Julia in
the picture until you get to the 8M fractal. If you just load 8J there is
no default Julia and you get a black screen.
So for this tutorial we will tune and optimize the formulas a little. 
Lets take the periodicity issue. When ever you have formulas where taking
a reciprocal is involved ( 1/0 AND 1/INF ) you really should disable
periodicity. And truly a finished fractal should always be generated with
periodicity off. So lets shut off periodicity checking. Go to the default
section of both 8M and 8J formulas and add the following into the section:
Periodicity = 0 
Lets save our work. Close all tutorial fractal windows. Reload the
Ftswitch8M formula from the file-new-fractal. Notice the periodicity is
set to off.
For the sake of detail lets increase the maximum iteration to 2500.  We
really don't need that many but we can change it after.  Lets enter the
following line in the default section of both the 8J and 8M formulas:
Maxiter = 2500
Save our work and close all tutorial fractal windows. reload the 8m
formula by file-new-fractal.  Notice the maximum iteration.
The scale problem is easy to take care of. From a Ftswitch8M fractal
window click SWITCH to any random Julia. Click to edit the formula. In the
Ftswitch8J formula change Z = #pixel to Z = 2*#pixel. Lets save our work.
Reload the Ftswitch8J formula using the reload icon. See the change in the
scale?  We've effectively zoomed out 2x but kept the pixel assignments.
Lets make the default iteration cut off value user selectable. We will add
a parameter variable called rip to the default sections of each formula.
Param rip
Caption = "BO Value"
Default = 4.0
Endparam
We then replace the |Z|<4 with |z|<@rip in the bailout section of each
formula. The formulas should look like this:
Ftswitch8m{
init:
b= @brad
z=#pixel
LOOP:
z = #pixel*b*z/(#pixel^2+z^2)
Bailout:
|z|<@rip
Default:
periodicity = 0
maxiter = 2500
Param brad
hint = "this is the radius of the circle\
That is tangent to the serpentine curve."
Caption = "B Radius"
Default = (1.0,0.0)
endparam
Param rip
Caption = "BO Value"
Default = 4.0
Endparam
Switch:
type = "Ftswitch8J"
flop = #pixel
brad = brad
rip =rip
}
Ftswitch8J{
init:
b= @brad
z=2*#pixel
LOOP:
z = @flop*b*z/(@flop^2+z^2)
Bailout:
|z| < @rip
Default:
Param brad
hint = "this is the radius of the circle\
That is tangent to the serpentine curve."
Caption = "B Radius"
Default = (1.0,0.0)
endparam
Param rip
Caption = "BO Value"
Default = 4.0
endparam
periodicity = 0
maxiter = 2500
Switch:
type = "Ftswitch8M"
brad = brad
rip = rip
}
So now we need to take care of the default value for the Julia map.
Lets add a parameter block in the 8J formula for the flop parameter and
give
it a default value.
Param flop
Caption = "Julia Coordinates"
default = (0.21, 0.426)
endparam
and that addresses the issues above.
Just as a little extra, I really liked that fuzz factor from the previous
tutorial so lets stick it in these formulas.
First we need to add to the 8M and 8J formulas a parameter block for a
parameter called fuzz. Lets put this into the default sections.
Param fuzz
Caption = "Fuzzy Navel"
Hint = "This is a blurring brush"
Default = 0.0
Endparam
Next we need to add this if loop to the loop section to replace the
iterated
function.
If @fuzz == 0
z = @flop*b*z/(@flop^2+z^2)
Else
z = @flop*b*z/(@flop^2+z^2) + @fuzz*#rand/10000
Endif
Next we need to add the line 
fuzz = fuzz 
to the switch section of the two formulas and now they look like this:
Ftswitch8m{
init:
b= @brad
z=#pixel
LOOP:
z = #pixel*b*z/(#pixel^2+z^2)
Bailout:
|z| < @rip
Default:
periodicity = 0
maxiter = 2500
Param brad
hint = "this is the radius of the circle\
That is tangent to the serpentine curve."
Caption = "B Radius"
Default = (1.0,0.0)
endparam
Param rip
Caption = "BO Value"
Default = 4.0
endparam
Param fuzz
Caption = "Fuzzy Navel"
Hint = "This is a blurring brush"
Default = 0.0
Endparam
Switch:
type = "Ftswitch8J"
flop = #pixel
brad = brad
rip =rip
fuzz = fuzz
}
and
Ftswitch8J{
init:
b= @brad
z=2*#pixel
LOOP:
If @fuzz == 0
z = @flop*b*z/(@flop^2+z^2)
Else
Z=z = @flop*b*z/(@flop^2+z^2) + @fuzz*#rand/10000
Endif
Bailout:
|z| < @rip
Default:
Param brad
hint = "this is the radius of the circle\
That is tangent to the serpentine curve."
Caption = "B Radius"
Default = (1.0,0.0)
endparam
Param rip
Caption = "BO Value"
Default = 4.0
endparam
Param fuzz
Caption = "Fuzzy Navel"
Hint = "This is a blurring brush"
Default = 0.0
Endparam
periodicity = 0
maxiter = 2500
Switch:
type = "Ftswitch8M"
brad = brad
rip = rip
fuzz = fuzz
}
Lets save all our work.
Close all tutorial fractal windows
Load Ftswitch8M
Try some julias. Some fuzz factoring with layers.  Let me know what you
think.
In review we learned: How to disable periodicity checking and How to set a
default max iteration.  Everything should have been review, hopefully.