jlb
Class JLB_AdvancedBailout
Object
common:Generic
jlb:Reduction
jlb:JLB_AdvancedBailout
class
- Reduction:JLB_AdvancedBailout
The Iterate code is a direct copy from Ron Barnett's code, which appears in
several places.
Ultra Fractal Source
Toggle UF Source Code Display
class JLB_AdvancedBailout(Reduction) {
; The Iterate code is a direct copy from Ron Barnett's code, which appears in
; several places.
public:
import "common.ulb"
func JLB_AdvancedBailout(Generic pparent)
Reduction.Reduction(pparent)
endfunc
func Init(complex pz)
m_BailoutValue = real(pz)
endfunc
; @param pz
; @return true if bailed out.
bool func Iterate(complex pz)
if @bailout_type == "mod"
return (|pz| > m_BailoutValue)
elseif @bailout_type == "real"
return (sqr(real(pz)) > m_BailoutValue)
elseif @bailout_type == "imag"
return (sqr(imag(pz)) > m_BailoutValue)
elseif @bailout_type == "or"
return (sqr(real(pz)) > m_BailoutValue || sqr(imag(pz)) > m_BailoutValue)
elseif @bailout_type == "and"
return (sqr(real(pz)) > m_BailoutValue && sqr(imag(pz)) > m_BailoutValue)
elseif @bailout_type == "manh"
return (sqr(abs(real(pz)) + abs(imag(pz))) > m_BailoutValue)
elseif @bailout_type == "manr"
return (sqr(real(pz) + imag(pz)) > m_BailoutValue)
else;if @bailout_type == "function"
return (sqr(real(@bailout_func(pz))) > m_BailoutValue)
endif
endfunc
protected:
float m_BailoutValue
default:
title = "Advanced Bailout"
int param v_AdvancedBailout
caption = "Version (AdvancedBailout)"
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_AdvancedBailout < 100
endparam
Heading
caption = "Bailout"
Endheading
param bailout_type
caption = "Bailout test type"
default = 0
enum = "mod" "real" "imag" "or" "and" "manh" "manr" "function"
hint = "mod gives the usual behavior"
endparam
func bailout_func
caption = "Bailout Function"
default = ident ()
visible = @bailout_type == 7
endfunc
}
Methods inherited from class Object |
|
JLB_AdvancedBailout
public JLB_AdvancedBailout(Generic pparent)
JLB_AdvancedBailout
public JLB_AdvancedBailout()
Init
public void Init(complex pz)
- Overrides:
Init
in class Reduction
Iterate
public boolean Iterate(complex pz)
- Overrides:
Iterate
in class Reduction
- Parameters:
pz
-
- Returns:
- true if bailed out.