mmf
Class MMF_TransformProduct

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UserTransform
              extended by mmf:MMF_TransformProduct

class 
UserTransform:MMF_TransformProduct

Multiplies up to 10 transforms together (with powers)


Ultra Fractal Source

Toggle UF Source Code Display

 class MMF_TransformProduct(common.ulb:UserTransform) {
 ; Multiplies up to 10 transforms together (with powers)<br>
 public:
   import "common.ulb"
   
   ; @param pparent the parent, generally "this" for the parent, or zero
   func MMF_TransformProduct(Generic pparent)
     UserTransform.UserTransform(pparent)
     fTransform1 = new @p_Transform1(this)
     fTransform2 = new @p_Transform2(this)
     fTransform3 = new @p_Transform3(this)
     fTransform4 = new @p_Transform4(this)
     fTransform5 = new @p_Transform5(this)
     fTransform6 = new @p_Transform6(this)
     fTransform7 = new @p_Transform7(this)
     fTransform8 = new @p_Transform8(this)
     fTransform9 = new @p_Transform9(this)
     fTransform10 = new @p_Transform10(this)
   endfunc
 
   func Init(complex pz)
 ;    m_Iterations = 0 not used in this transform
     m_Solid = false
     fTransform1.Init(pz)
     fTransform2.Init(pz)
     fTransform3.Init(pz)
     fTransform4.Init(pz)
     fTransform5.Init(pz)
     fTransform6.Init(pz)
     fTransform7.Init(pz)
     fTransform8.Init(pz)
     fTransform9.Init(pz)
     fTransform10.Init(pz)
   endfunc
 
   complex func Iterate(complex pz)
 ;    m_Iterations = m_Iterations + 1 not used in this transform
     complex zz = fTransform1.Iterate(pz)^@p_power1 \
                  * fTransform2.Iterate(pz)^@p_power2
     if @p_numtrans=="3" || @p_numtrans=="4" || @p_numtrans=="5" \
        || @p_numtrans=="6" || @p_numtrans=="7" || @p_numtrans=="8" \
        || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform3.Iterate(pz)^@p_power3
     endif
     if @p_numtrans=="4" || @p_numtrans=="5" \
        || @p_numtrans=="6" || @p_numtrans=="7" || @p_numtrans=="8" \
        || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform4.Iterate(pz)^@p_power4
     endif
     if @p_numtrans=="5" \
        || @p_numtrans=="6" || @p_numtrans=="7" || @p_numtrans=="8" \
        || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform5.Iterate(pz)^@p_power5
     endif
     if @p_numtrans=="6" || @p_numtrans=="7" || @p_numtrans=="8" \
        || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform6.Iterate(pz)^@p_power6
     endif
     if @p_numtrans=="7" || @p_numtrans=="8" \
        || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform7.Iterate(pz)^@p_power7
     endif
     if @p_numtrans=="8" || @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform8.Iterate(pz)^@p_power8
     endif
     if @p_numtrans=="9" || @p_numtrans=="10"
       zz = zz * fTransform9.Iterate(pz)^@p_power9
     endif
     if @p_numtrans=="10"
       zz = zz * fTransform10.Iterate(pz)^@p_power10
     endif
     return zz
   endfunc
 
 private:
   Transform fTransform1
   Transform fTransform2
   Transform fTransform3
   Transform fTransform4
   Transform fTransform5
   Transform fTransform6
   Transform fTransform7
   Transform fTransform8
   Transform fTransform9
   Transform fTransform10
 
 default:
   title = "Transform Product"
   int param p_numtrans
     caption = "Number of terms"
     enum = "2" "3" "4" "5" "6" "7" "8" "9" "10"
     default = 0
     hint = "Each transform term is raised to its power \
             and the results are multiplied together."
   endparam
   heading
     text = "The first term in the product."
   endheading
   complex param p_power1
     caption = "Power 1"
     default = (1,0)
     hint = "The power of the first term."
   endparam
   Transform param p_Transform1
     caption = "First Transform"
     default = MMF_GeneralTransform
   endparam
   heading
     text = "The second term in the product."
   endheading
   complex param p_power2
     caption = "Power 2"
     default = (1,0)
     hint = "The power of the second term."
   endparam
   Transform param p_Transform2
     caption = "Second Transform"
     default = MMF_GeneralTransform
   endparam
   heading
     text = "The third term in the product."
     visible = @p_numtrans>0
   endheading
   complex param p_power3
     caption = "Power 3"
     default = (1,0)
     hint = "The power of the third term."
     visible = @p_numtrans>0
   endparam
   Transform param p_Transform3
     caption = "Third Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>0
   endparam
   heading
     text = "The fourth term in the product."
     visible = @p_numtrans>1
   endheading
   complex param p_power4
     caption = "Power 4"
     default = (1,0)
     hint = "The power of the fourth term."
     visible = @p_numtrans>1
   endparam
   Transform param p_Transform4
     caption = "Fourth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>1
   endparam
   heading
     text = "The fifth term in the product."
     visible = @p_numtrans>2
   endheading
   complex param p_power5
     caption = "Power 5"
     default = (1,0)
     hint = "The power of the fifth term."
     visible = @p_numtrans>2
   endparam
   Transform param p_Transform5
     caption = "Fifth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>2
   endparam
   heading
     text = "The sixth term in the product."
     visible = @p_numtrans>3
   endheading
   complex param p_power6
     caption = "Power 6"
     default = (1,0)
     hint = "The power of the sixth term."
     visible = @p_numtrans>3
   endparam
   Transform param p_Transform6
     caption = "Sixth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>3
   endparam
   heading
     text = "The seventh term in the product."
     visible = @p_numtrans>4
   endheading
   complex param p_power7
     caption = "Power 7"
     default = (1,0)
     hint = "The power of the seventh term."
     visible = @p_numtrans>4
   endparam
   Transform param p_Transform7
     caption = "Seventh Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>4
   endparam
   heading
     text = "The eighth term in the product."
     visible = @p_numtrans>5
   endheading
   complex param p_power8
     caption = "Power 8"
     default = (1,0)
     hint = "The power of the eighth term."
     visible = @p_numtrans>5
   endparam
   Transform param p_Transform8
     caption = "Eighth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>5
   endparam
   heading
     text = "The ninth term in the product."
     visible = @p_numtrans>6
   endheading
   complex param p_power9
     caption = "Power 9"
     default = (1,0)
     hint = "The power of the ninth term."
     visible = @p_numtrans>6
   endparam
   Transform param p_Transform9
     caption = "Ninth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>6
   endparam
   heading
     text = "The tenth term in the product."
     visible = @p_numtrans>7
   endheading
   complex param p_power10
     caption = "Power 10"
     default = (1,0)
     hint = "The power of the tenth term."
     visible = @p_numtrans>7
   endparam
   Transform param p_Transform10
     caption = "Tenth Transform"
     default = MMF_GeneralTransform
     visible = @p_numtrans>7
   endparam
 }
 


Constructor Summary
MMF_TransformProduct()
           
MMF_TransformProduct(Generic pparent)
           
 
Method Summary
 void Init(complex pz)
          Set up for a sequence of values
 complex Iterate(complex pz)
          Transform a single point within a sequence
 
Methods inherited from class common:Transform
IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

MMF_TransformProduct

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

MMF_TransformProduct

public MMF_TransformProduct()
Method Detail

Init

public void Init(complex pz)
Description copied from class: Transform
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). It will be called even if only one value is being transformed (e.g. a normal transformation formula). Use this to perform any setup that is exactly the same for each value in the sequence being transformed.

Overrides:
Init in class Transform
Parameters:
pz - the value representing the sequence; for a normal transformation formula use, this will be #pixel. In some cases this may differ from the first value passed to Iterate() if the calling code applies some other transformations.

Iterate

public complex Iterate(complex pz)
Description copied from class: Transform
Transform a single point within a sequence

After a sequence has been set up with Init(), this function will be called once for each value in the sequence. Note that all values in the sequence must be processed in order (they cannot be processed out of order). If the sequence contains only one value, Init() will still be called and then Iterate() will be called just once.

Overrides:
Iterate in class Transform
Parameters:
pz - the complex value to be transformed
Returns:
the transformed value