mmf
Class MMF_SwitchStandard

Object
  extended by common:Generic
      extended by common:Formula
          extended by common:DivergentFormula
              extended by mmf:MMF_SwitchDivergentFormula
                  extended by mmf:MMF_SwitchStandard

class 
MMF_SwitchDivergentFormula:MMF_SwitchStandard

Generic Switchable Mandelbrot set.


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_SwitchStandard(MMF_SwitchDivergentFormula) {
 ;
 ; Generic Switchable Mandelbrot set.<br>
 ;
 public:
   import "common.ulb"
   ; @param pparent the parent, generally "this" for the parent, or zero
   func MMF_SwitchStandard(Generic pparent)
     MMF_SwitchDivergentFormula.MMF_SwitchDivergentFormula(pparent)
   endfunc
   
   complex func Iterate(complex pz)
     if @p_advanced && @p_switch=="Power"
       return pz^fConstant + @p_seed1
     else
       return pz^@p_power + fConstant
     endif
   endfunc
 
 default:
   title = "Switch Standard"
   rating = recommended
   bool param p_advanced
     caption = "Enable Advanced Settings"
     default = false
     hint = "When enabled you can choose which variable is switchable."
   endparam
   int param p_switch
     caption = "Switch Value"
     enum = "Normal" "Power"
     default = 1
     hint = "In 'Normal' mode the constant c in z^p+c is the switchable \
             variable, in 'Power' mode the power p in z^p+c is used \
             instead."
     visible = @p_advanced
   endparam
   complex param p_seed1
     caption = "Seed"
     default = (0.25,0)
     hint = "The constant c in z^p+c."
     visible = @p_advanced && @p_switch>0
   endparam
   complex param p_power
     caption = "Power"
     default = (2,0)
     hint = "This parameter sets the exponent for the standard z^p+c \
             formula. Increasing the real part to 3, 4, and so on, \
             will add discs to the Mandelbrot figure. Non-integer \
             real values and non-zero imaginary values will create \
             distorted sets. Use (2, 0) for the standard Mandelbrot/Julia \
             sets."
     visible = !@p_advanced || @p_switch!=1
   endparam
 }
 


Constructor Summary
MMF_SwitchStandard()
           
MMF_SwitchStandard(Generic pparent)
           
 
Method Summary
 complex Iterate(complex pz)
          Produce the next value in the sequence
 
Methods inherited from class mmf:MMF_SwitchDivergentFormula
Init, SetParams
 
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

MMF_SwitchStandard

public MMF_SwitchStandard(Generic pparent)
Parameters:
pparent - the parent, generally "this" for the parent, or zero

MMF_SwitchStandard

public MMF_SwitchStandard()
Method Detail

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