jlb
Class JLB_SwitchSuper
Object
common:Generic
common:Formula
common:DivergentFormula
mmf:MMF_SwitchDivergentFormula
jlb:JLB_SwitchSuper
class
- MMF_SwitchDivergentFormula:JLB_SwitchSuper
A wrapper that enables many formulas to be duplicated
and new ones made. Plug this into David Makin's
Generic Switch Formula to do Mandelbrot-style and Julia-style
formulas.
Ultra Fractal Source
Toggle UF Source Code Display
class JLB_SwitchSuper(mmf.ulb:MMF_SwitchDivergentFormula) {
; A wrapper that enables many formulas to be duplicated
; and new ones made. Plug this into David Makin's
; Generic Switch Formula to do Mandelbrot-style and Julia-style
; formulas.
;
public:
import "common.ulb"
import "mmf.ulb"
func JLB_SwitchSuper(Generic pparent)
MMF_SwitchDivergentFormula.MMF_SwitchDivergentFormula(pparent)
m_BailoutFunc = new @f_bailout(this)
m_DualTransform = new @f_DualTransform(this)
m_DualTransformInit = new @f_DualTransformInit(this)
endfunc
; @param pz
; @Initialize
complex func Init(complex pz)
m_BailoutFunc.Init(@p_bailout) ; from parent class
pz = MMF_SwitchDivergentFormula.Init(pz)
m_DualTransformInit.Init(pz)
return pz
endfunc
; @param pz
; Iterate--all the work is done in the plug-in.
complex func Iterate(complex pz)
m_DualTransform.Iterate(pz, fConstant)
return pz
endfunc
; @param pz
; @return true if bailed out.
bool func IsBailedOut(complex pz)
return m_BailoutFunc.Iterate(pz)
endfunc
protected:
DualTransform m_DualTransform
DualTransform m_DualTransformInit
Reduction m_BailoutFunc
default:
title = "Switch Super"
rating = recommended
param p_power ; Overrides p_power from Formula
caption = "Power"
default = (2,0)
visible = false
enabled = false
endparam
int param v_superswitch
caption = "Version (JLB_superswitch)"
default = 100
hint = "This version parameter is used to detect when a change has \
been made to the formula that is incompatible with the \
previous version. When that happens, this field will reflect \
the old version number to alert you to the fact that an \
alternate rendering is being used."
visible = @v_superswitch < 100
endparam
Heading
caption = "Start of Switch Super parameters"
Endheading
Heading
Endheading
DualTransform param f_DualTransformInit
caption = "Initialize"
default = JLB_NullDualTransform
endparam
Heading
Endheading
DualTransform param f_DualTransform
caption = "Formula"
default = JLB_MandelbrotDualTransform
endparam
Heading
caption = "Bailout"
Endheading
Reduction param f_bailout
caption = "Bailout Type"
default = JLB_SimpleBailout
endparam
}
Methods inherited from class Object |
|
JLB_SwitchSuper
public JLB_SwitchSuper(Generic pparent)
JLB_SwitchSuper
public JLB_SwitchSuper()
Init
public complex Init(complex pz)
- Description copied from class:
DivergentFormula
- Set up for a sequence of values
This function will be called at the beginning of each
sequence of values (e.g. at the beginning of each fractal
orbit).
- Overrides:
Init
in class MMF_SwitchDivergentFormula
- Parameters:
pz
- Initialize
- Returns:
- initial z for iteration
Iterate
public complex Iterate(complex pz)
- Description copied from class:
Formula
- Produce the next value in the sequence
As long as the sequence has not bailed out, this function
will be continually called to produce sequence values.
- Overrides:
Iterate
in class Formula
- Parameters:
pz
- Iterate--all the work is done in the plug-in.
- Returns:
- the next value in the sequence
IsBailedOut
public boolean IsBailedOut(complex pz)
- Description copied from class:
DivergentFormula
- Test whether the formula has bailed out (i.e. the sequence is complete)
Since this is a divergent fractal, the test is easy: if it's
bigger than the bailout, the sequence is done.
- Overrides:
IsBailedOut
in class DivergentFormula
- Parameters:
pz
-
- Returns:
- true if bailed out.