reb
Class REB_FractalTiles

Object
  extended by common:Generic
      extended by common:Formula
          extended by reb:REB_FractalTiles

class 
Formula:REB_FractalTiles

A tiling formula that can be used with any object formualas.



Ultra Fractal Source

Toggle UF Source Code Display

 class REB_FractalTiles(common.ulb:Formula) {
 ; A tiling formula that can be used with any object formualas. <br>
 ; <p>
 
 public:
   import "common.ulb"
 
   ; constructor
   func REB_FractalTiles(Generic pparent)
     Formula.Formula(pparent)
     fFormula = new @formulaclass(this)
   endfunc
 
   ; initialize the object
   complex func Init(complex pz)
     Formula.Init(pz)
     pz=(@fn1(@fn2(real(pz)))+flip(@fn1(@fn2(imag(pz)))))/@p2
     pz = fFormula.Init(pz)
     return pz
   endfunc
 
   ; call for each iterated point. Overrides the parent Iterate function. <br>
   ;  <p>
   complex func Iterate(complex pz)
     pz = fFormula.Iterate(pz)
     return pz
   endfunc
 
   ; Override the default function for bailout
   bool func IsBailedOut(complex pz)
     return fFormula.IsBailedOut(pz)
   endfunc
 
 private:
   Formula fFormula
 
 default:
   title = "Fractal Tiler"
   heading
     text = "This a formula that can create seamless tiles with any fractal \
             object. For the best results, set the magnification on the location \
             tab to 0.6366 and do not change the other location tab settings \
             other than position. Set the Image width equal to the image height. \
             There are other combinations that will give seamless tiles."
   endheading
   int param v_fractaltiler
     caption = "Version (Fractal Tiler)"
     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_fractaltiler < 100
   endparam
   Formula param formulaclass
     caption = "Fractal Formula"
     default = REB_Julia
     hint = "Sets the actual fractal formula to use for tiing."
   endparam
   param p2
      caption = "Zoom"
      default = 2.0
   endparam
   func fn1
      caption = "First Function"
      default = tan()
   endfunc
   func fn2
      caption = "Second Function"
      default = sin()
   endfunc
   complex param p_power ; Hide p_power from Formula
     visible = false
   endparam
 }
 


Constructor Summary
REB_FractalTiles()
           
REB_FractalTiles(Generic pparent)
          constructor
 
Method Summary
 complex Init(complex pz)
          initialize the object
 boolean IsBailedOut(complex pz)
          Override the default function for bailout
 complex Iterate(complex pz)
          call for each iterated point.
 
Methods inherited from class common:Formula
GetLowerBailout, GetPrimaryExponent, GetUpperBailout
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

REB_FractalTiles

public REB_FractalTiles(Generic pparent)
constructor


REB_FractalTiles

public REB_FractalTiles()
Method Detail

Init

public complex Init(complex pz)
initialize the object

Overrides:
Init in class Formula
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)
call for each iterated point. Overrides the parent Iterate function.

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

IsBailedOut

public boolean IsBailedOut(complex pz)
Override the default function for bailout

Overrides:
IsBailedOut in class Formula
Parameters:
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.
Returns:
true if the sequence has bailed out (i.e. should be terminated)