jlb
Class JLB_TMAContraction

Object
  extended by common:Generic
      extended by mmf:Contraction
          extended by jlb:JLB_TMAContraction

class 
Contraction:JLB_TMAContraction

Part of the Spiroglyphics formula, as in tma2.ufm, as a Contraction.


Ultra Fractal Source

Toggle UF Source Code Display

 class JLB_TMAContraction(mmf.ulb:Contraction) {
 ; Part of the Spiroglyphics formula, as in tma2.ufm, as a Contraction.
 public:
 
    ; @param pz
    ; @param pc
    ; @return the contracted value
   complex func Iterate(complex pz, complex pc)
     if @select == "z"; select variable type
       pz = @fnz(pz-@zg)*@ezg
     elseif @select == "z+c"
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z-c"
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "c-z"
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z*c"
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z/c"
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z+c|z+c"
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z+c|c-z"
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z+c|z*c"
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z+c|z/c"
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z-c|z-c"
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z-c|c-z"
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z-c|z*c"
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z-c|z/c"
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "c-z|z*c"
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "c-z|z/c"
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z*c|c-z"
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z*c|z*c"
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z/c|z+c"
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z/c|z-c"
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z/c|c-z"
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z/c|z/c"
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z*c+(Rz+Iz)"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
     elseif @select == "z/c+(Rz+Iz)"
       pz = (@fnz(pz-@zg)*@ezg/@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
     elseif @select == "z/c-(Rz+Iz)"
       pz = (@fnz(pz-@zg)*@ezg/@fnc((pc-@cg)*@cmg)^@ecg)-((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
     elseif @select == "z*c-+(Rz+Iz)"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)-((real(pz+@addz)\
     *@muzr)\
           ^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
     elseif @select == "z/c-+(Rz+Iz)"
       pz = (@fnz(pz-@zg)*@ezg/@fnc((pc-@cg)*@cmg)^@ecg)-((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = (@fnz(pz-@zg)*@ezg/@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
     elseif @select == "z*c+(Rz+Iz)|z+c"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = @fnz(pz-@zg)*@ezg + @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z*c+(Rz+Iz)|z-c"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = @fnz(pz-@zg)*@ezg - @fnc((pc-@cg)*@cmg)^@ecg
     elseif @select == "z*c+(Rz+Iz)|c-z"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = @fnc((pc-@cg)*@cmg)^@ecg - @fnz(pz-@zg)*@ezg
     elseif @select == "z*c+(Rz+Iz)|z*c"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = @fnz(pz-@zg)*@ezg * @fnc((pc-@cg)*@cmg)^@ecg
     else;if @select == "z*c+(Rz+Iz)|z/c"
       pz = (@fnz(pz-@zg)*@ezg*@fnc((pc-@cg)*@cmg)^@ecg)+((real(pz+@addz)\
           *@muzr)^@exzr+(imag(pz+@addz)*@muzi)^@exzi)
       pz = @fnz(pz-@zg)*@ezg / @fnc((pc-@cg)*@cmg)^@ecg
     endif
     return pz
    endfunc
 
  default:
   title = "TMA Contraction"
    int param v_tmacontraction
      caption = "Version (TMA_Contraction)"
      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_tmacontraction < 100
    endparam
    param select
     caption = "Z Mode"
     enum = "z" "z+c" "z-c" "c-z" "z*c" "z/c" "z+c|z+c" "z+c|c-z" "z+c|z*c"\
      "z+c|z/c" "z-c|z-c" "z-c|c-z" "z-c|z*c" "z-c|z/c" "c-z|z*c" "c-z|z/c"\
      "z*c|c-z" "z*c|z*c" "z/c|z+c" "z/c|z-c" "z/c|c-z" "z/c|z/c"\
      "z*c+(Rz+Iz)" "z/c+(Rz+Iz)" "z/c-(Rz+Iz)" "z*c-+(Rz+Iz)"\
      "z/c-+(Rz+Iz)" "z*c+(Rz+Iz)|z+c" "z*c+(Rz+Iz)|z-c" "z*c+(Rz+Iz)|c-z"\
      "z*c+(Rz+Iz)|z*c" "z*c+(Rz+Iz)|z/c"
     default = 0
     hint = "Determines the initial definition of Z"
   endparam
 
   complex param zg
     caption = "Z Param 1"
     default = (0,0)
   endparam
 
   complex param ezg
     caption = "Z Param 2"
     default = (1,0)
   endparam
 
   complex param addz
     caption = "Z Param 3"
     default = (1.0,0.0)
     visible = (@select == 22)||(@select == 23)||(@select == 24)||\
               (@select == 25)||(@select == 26)|| (@select == 27)||\
               (@select == 28)||(@select == 29)||(@select == 30)|| \
               (@select == 31)
   endparam
 
   complex param muzr
     caption = "Z Strength re"
     default = (1.0,0.0)
     visible = (@select == 22)||(@select == 23)||(@select == 24)||\
               (@select == 25)||(@select == 26)|| (@select == 27)||\
               (@select == 28)||(@select == 29)||(@select == 30)|| \
               (@select == 31)
   endparam
 
   complex param muzi
     caption = "Z Strength im"
     default = (1.0,0.0)
     visible = (@select == 22)||(@select == 23)||(@select == 24)||\
               (@select == 25)||(@select == 26)|| (@select == 27)||\
               (@select == 28)||(@select == 29)||(@select == 30)|| \
               (@select == 31)
   endparam
 
   complex param exzr
     caption = "Z Power re"
     default = (1.0,0.0)
     visible = (@select == 22)||(@select == 23)||(@select == 24)||\
               (@select == 25)||(@select == 26)|| (@select == 27)||\
               (@select == 28)||(@select == 29)||(@select == 30)|| \
               (@select == 31)
   endparam
 
   complex param exzi
     caption = "Z Power im"
     default = (1.0,0.0)
     visible = (@select == 22)||(@select == 23)||(@select == 24)||\
               (@select == 25)||(@select == 26)|| (@select == 27)||\
               (@select == 28)||(@select == 29)||(@select == 30)|| \
               (@select == 31)
   endparam
 
   complex param cg
     caption = "C Param 1"
     default = (0,0)
     visible = @select != 0
   endparam
 
   complex param cmg
     caption = "C Param 2"
     default = (1,0)
     visible = @select != 0
   endparam
 
   complex param ecg
     caption = "C Param 3"
     default = (1,0)
     visible = @select != 0
   endparam
 
   func fnz
     caption = "Global Z Func"
     default = ident()
     hint = "Applies a function to the initial Z"
   endfunc
 
   func fnc
     caption = "Global C Func"
     default = ident()
     visible = @select != 0
     hint = "Applies a function to the initial C"
   endfunc
 }
 


Constructor Summary
JLB_TMAContraction()
           
 
Method Summary
 complex Iterate(complex pz, complex pc)
           
 
Methods inherited from class mmf:Contraction
Init
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

JLB_TMAContraction

public JLB_TMAContraction()
Method Detail

Iterate

public complex Iterate(complex pz,
                       complex pc)
Overrides:
Iterate in class Contraction
Parameters:
pz -
pc -
Returns:
the contracted value