mmf
Class MMF_SwitchDivergentFormula
Object
common:Generic
common:Formula
common:DivergentFormula
mmf:MMF_SwitchDivergentFormula
- Direct Known Subclasses:
- JLB_SlopeWithShapes, JLB_SwitchSuper, MMF_SwitchBeta, MMF_SwitchPhoenix, MMF_SwitchStandard, TMA_SwitchTalis
class
- DivergentFormula:MMF_SwitchDivergentFormula
Base class for Divergent formulas that allow switching to be used with
mmf5.ufm-Generic Switch Formula
Ultra Fractal Source
Toggle UF Source Code Display
class MMF_SwitchDivergentFormula(common.ulb:DivergentFormula) {
; Base class for Divergent formulas that allow switching to be used with
; mmf5.ufm-Generic Switch Formula<br>
public:
import "common.ulb"
; @param pparent the parent, generally "this" for the parent, or zero
func MMF_SwitchDivergentFormula(Generic pparent)
DivergentFormula.DivergentFormula(pparent)
if (fType = @p_mandy)
fValue = fConstant = @p_start
else
fValue = fConstant = @p_seed
endif
endfunc
; @param pz the initial location
; @return initial z for iteration
complex func Init(complex pz)
DivergentFormula.Init(pz)
if fType
fConstant = pz
if @p_addpixel
return fValue + fConstant
else
return fValue
endif
else
return pz
endif
endfunc
; @param f flag for Mandelbrot or Julia mode, is true for Mandelbrots
; @param v the value to be used as the start value or constant
func SetParams(bool f,complex v)
if !@p_manual
fType = f
fValue = fConstant = v
endif
endfunc
protected:
complex fConstant
complex fValue
bool fType
default:
int param v_switchdivergentformula
caption = "Version (MMF_DivergentFormula)"
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_switchdivergentformula < 100
endparam
heading
caption = "Information"
text = "This formula object is intended for use with the 'Generic \
Switch Formula' in mmf5.ufm and in formula objects that \
allow switching, however it will still function without \
switching in non-switching formulas and formula objects."
endheading
heading
enabled = false
endheading
bool param p_manual
caption = "Manual Over-ride"
default = false
hint = "When enabled you will have manual control of the \
Mandelbrot/Julia switching and the associated parameters \
i.e. you will be able to over-ride the settings from the \
parent object. Note that this will effectively disable \
UF's built-in switching but allow full use of this formula \
when not used with a compatible switching parent."
endparam
bool param p_mandy
caption = "Mandelbrot ?"
default = true
hint = "Disable for Julia mode."
visible = @p_manual
endparam
complex param p_start
caption = "Mandelbrot Start Value"
default = (0,0)
visible = @p_manual && @p_mandy
endparam
complex param p_seed
caption = "Julia Constant"
default = (-1.25,0)
visible = @p_manual && !@p_mandy
endparam
bool param p_addpixel
caption = "Offset z start"
default = false
hint = "When enabled the z start value (in Mandelbrot mode) is offset \
by the constant for the current position - normally '#pixel'."
visible = !@p_manual || @p_mandy
endparam
float param p_bailout
caption = "Bailout"
default = 128.0
hint = "Defines how soon an orbit bails out, i.e. doesn't belong \
to the fractal set anymore. Note: larger values result in \
more iterations being calculated."
endparam
}
Methods inherited from class Object |
|
MMF_SwitchDivergentFormula
public MMF_SwitchDivergentFormula(Generic pparent)
- Parameters:
pparent
- the parent, generally "this" for the parent, or zero
MMF_SwitchDivergentFormula
public MMF_SwitchDivergentFormula()
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 DivergentFormula
- Parameters:
pz
- the initial location
- Returns:
- initial z for iteration
SetParams
public void SetParams(boolean f,
complex v)
- Parameters:
f
- flag for Mandelbrot or Julia mode, is true for Mandelbrotsv
- the value to be used as the start value or constant