mt
Class MT_Boost

Object
  extended by common:Generic
      extended by common:Formula
          extended by common:DivergentFormula
              extended by mt:MT_Boost

class 
DivergentFormula:MT_Boost

Mark Townsend, June 2008


Ultra Fractal Source

Toggle UF Source Code Display

 class MT_Boost(common.ulb:DivergentFormula) {
 ;
 ; Mark Townsend, June 2008
 ;
 public:
   import "Standard.ulb"
 
   func MT_Boost(Generic pparent)
     fFormula1 = new @formula1Class(this)
     fFormula2 = new @formula2Class(this)
     fTrapShape = new @TrapShapeClass(this)
   endfunc
 
   complex func Init(complex pz)
     complex start = fFormula1.Init(pz)
     fFormula2.Init(pz)
     fTrapShape.Init(pz)
     return start
   endfunc
 
   complex func Iterate(complex pz)
     z = fFormula1.Iterate(pz)
     if fTrapShape.Iterate(z) < @p_threshold
       z = fFormula2.Iterate(z)
     endif
     return z
   endfunc
 
 private:
   Formula fFormula1
   Formula fFormula2
   TrapShape fTrapShape
 
 default:
   title = "Mark's Boost"
   float param p_threshold
     caption = "Threshold"
     default = 0.5
     min = 1E-10
   endparam
   Formula param formula1Class
     caption = "First Formula"
     default = Standard_Mandelbrot
   endparam
   Formula param formula2Class
     caption = "Second Formula"
     default = Standard_Newton
   endparam
   TrapShape param TrapShapeClass
     caption = "Trap Shape"
     default = TrapShapeBlock
   endparam
   float param p_bailout
     caption = "Bailout"
     default = 1.0e20
   endparam
   param p_power
     visible = false
   endparam
 }
 


Constructor Summary
MT_Boost()
           
MT_Boost(Generic pparent)
           
 
Method Summary
 complex Init(complex pz)
          Set up for a sequence of values
 complex Iterate(complex pz)
          Produce the next value in the sequence
 
Methods inherited from class common:DivergentFormula
GetUpperBailout, IsBailedOut
 
Methods inherited from class common:Formula
GetLowerBailout, GetPrimaryExponent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MT_Boost

public MT_Boost(Generic pparent)

MT_Boost

public MT_Boost()
Method Detail

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 - seed value for the sequence; for a normal fractal formula, this will be #pixel
Returns:
first value in the sequence; this corresponds to #z in a fractal formula

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 - 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.
Returns:
the next value in the sequence