|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:Formula common:DivergentFormula reb:REB_FunBarnsleyJulia1
class
Barnsley Julia with Fractint style bailout options.
The default drawing method is multi-pass linear and periodicity checking
is off.
class REB_FunBarnsleyJulia1(common.ulb:DivergentFormula) { ; Barnsley Julia with Fractint style bailout options. <br> ; <p> ; The default drawing method is multi-pass linear and periodicity checking ; is off. public: import "common.ulb" ; constructor func REB_FunBarnsleyJulia1(Generic pparent) DivergentFormula.DivergentFormula(pparent) endfunc ; initialize the formula complex func Init(complex pz) divergentFormula.Init(pz) return pz endfunc ; call for each iterated point complex func Iterate(complex pz) DivergentFormula.Iterate(pz) IF real(pz) >= 0 pz = @fn1(pz) pz = (pz - 1) * @seed ELSE pz = @fn1(pz) pz = (pz + 1) * @seed ENDIF return pz endfunc ; This overrides the divergent formula bailout. bool func IsBailedOut(complex pz) bool bail = false if @test == 0 bail = (|pz| > @p_bailout) elseif @test == 1 bail = (sqr(real(pz)) > @p_bailout) elseif @test == 2 bail = (sqr(imag(pz)) > @p_bailout) elseif @test == 3 bail = (sqr(real(pz)) > @p_bailout || sqr(imag(pz)) > @p_bailout) elseif @test == 4 bail = (sqr(real(pz)) > @p_bailout && sqr(imag(pz)) > @p_bailout) elseif @test == 5 bail = (sqr(abs(real(pz)) + abs(imag(pz))) > @p_bailout) elseif @test == 6 bail = (sqr(real(pz) + imag(pz)) > @p_bailout) endif return bail endfunc default: title = "Function Barnsley 1 Julia" int param v_funbarnsleyjulia1 caption = "Version (FunBarnsleyJulia1)" 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_funbarnsleyjulia1 < 100 endparam heading text = "This a Barnsley Julia that includes the Fractint bailout options." endheading param test caption = "Bailout Test" default = 0 enum = "mod" "real" "imag" "or" "and" "manh" "manr" hint = "mod is the standard bailout. The remaining bailout methods are \ from Fractint." endparam float param p_bailout ; Overrides p_bailout from DivergentFormula caption = "Bailout value" default = 10000.0 min = 1.0 endparam complex param seed caption = "Julia seed" default = (0.9, 1.0) hint = "Use this parameter to create many different Julia sets. A good \ way to set this parameter is with the Eyedropper or Explore features." endparam func fn1 caption = "Function" default = ident() endfunc complex param p_power ; Overrides p_power from Formula caption = "Power" default = (2,0) visible = false endparam }
Constructor Summary | |
---|---|
REB_FunBarnsleyJulia1()
|
|
REB_FunBarnsleyJulia1(Generic pparent)
constructor |
Method Summary | |
---|---|
complex |
Init(complex pz)
initialize the formula |
boolean |
IsBailedOut(complex pz)
This overrides the divergent formula bailout. |
complex |
Iterate(complex pz)
call for each iterated point |
Methods inherited from class common:DivergentFormula |
---|
GetUpperBailout |
Methods inherited from class common:Formula |
---|
GetLowerBailout, GetPrimaryExponent |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public REB_FunBarnsleyJulia1(Generic pparent)
public REB_FunBarnsleyJulia1()
Method Detail |
---|
public complex Init(complex pz)
Init
in class DivergentFormula
pz
- seed value for the sequence; for a normal fractal formula, this will be #pixel
public complex Iterate(complex pz)
Iterate
in class Formula
pz
- previous value in the sequence; corresponds to #z in a fractal formula. Note that you should always use this value for computing the next iteration, rather than a saved value, as the calling code may modify the returned value before passing it back to the next Iterate() call.
public boolean IsBailedOut(complex pz)
IsBailedOut
in class DivergentFormula
pz
- last sequence value to test; this should be the value returned from the previous Iterate() call. Note that it is acceptable to ignore pz and use m_BailedOut, but any code calling IsBailedOut() should pass in the correct pz for Formula classes which do not use m_BailedOut.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |