ck
Class fn_z_plus_fn_pixel

Object
  extended by common:Generic
      extended by common:Formula
          extended by common:DivergentFormula
              extended by ck:fn_z_plus_fn_pixel

class 
DivergentFormula:fn_z_plus_fn_pixel

Object version of Fractint Manowar Formula


Ultra Fractal Source

Toggle UF Source Code Display

 class fn_z_plus_fn_pixel(common.ulb:DivergentFormula) {
 ;
 ; Object version of Fractint Manowar Formula
 ;
 public:
   import "Common.ulb"
   import "Standard.ulb"
 
   func fn_formula(Generic pparent)
     DivergentFormula.DivergentFormula(pparent)
 
 
   endfunc
   
   complex func Init(complex pz)
   pixel=pz;
            return pz+@start
   endfunc
 
   complex func Iterate(complex pz)
 
 return    fn1(pz) + @p1 * fn2(pixel)
   endfunc
 
 
 private:
   complex pixel;
 default:
   title = "fn[z]+fn[pix]"
   rating = recommended
 
      func fn1
     caption = "First Function"
     default = sin()
   endfunc
 
      func fn2
     caption = "Second Function"
     default = sin()
   endfunc
 
   complex param p_power
     caption = "Exponent"
     default = (2,0)
     hint = "Defines the primary exponent for the fractal."
     visible=true
   endparam
     param start
     caption = "Perturbation"
     default = (0,0)
   endparam
   param p1
     caption = "Coefficient"
     default = (1,0)
   endparam
   
 }
 


Constructor Summary
fn_z_plus_fn_pixel()
           
 
Method Summary
 void fn_formula(Generic pparent)
           
 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

fn_z_plus_fn_pixel

public fn_z_plus_fn_pixel()
Method Detail

fn_formula

public void fn_formula(Generic pparent)

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