jlb
Class JLB_BurningShipContraction

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

class 
Contraction:JLB_BurningShipContraction

The Burning Ship formula as a Contraction.


Ultra Fractal Source

Toggle UF Source Code Display

 class JLB_BurningShipContraction(mmf.ulb:Contraction) {
 ; The Burning Ship formula as a Contraction.
 public:
 
 
   ; @param pz
   ; @param pc
   ; @return the new pz
   complex func Iterate(complex pz, complex pc)
     float zx
     float zy
     if (@p_std)
       zx = abs(real(pz))
       zy = abs(imag(pz))
       return sqr(zx+flip(zy)) + pc
     else
       zx=abs(real(@xfunction(real(pz-@p_zoffset))))^@xpower
       zy=abs(real(@yfunction(imag(pz-@p_zoffset))))^@ypower
       return (@xweight*zx+@yweight*flip(zy))^@zpower+(pc - @p_coffset)
     endif
   endfunc
 
 default:
   title = "Burning Ship"
   int param v_BurningShipcontraction
      caption = "Version (BurningShip_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_BurningShipcontraction < 100
   endparam
   bool param p_std
     caption = "Standard"
     default = true
   endparam
   heading
     caption="General"
     visible = !@p_std
   endheading
   complex param p_zoffset
     caption = "pz offset"
     default = (0,0)
     visible = !@p_std
   endparam
   complex param p_coffset
     caption = "pc offset"
     default = (0,0)
     visible = !@p_std
   endparam
   complex param zpower
     caption="power"
     default=2
     visible = !@p_std
   endparam
 ;
 ; x parameters
 ;
   heading
     caption="X"
     visible = !@p_std
   endheading
   float param xpower
     caption="power"
     default=1
     visible = !@p_std
   endparam
   func xfunction
     caption="function"
     default=ident()
     visible = !@p_std
   endfunc
   complex param xweight
     caption="weight"
     default=1
     visible = !@p_std
   endparam
 ;
 ; y parameters
 ;
   heading
     caption="Y"
     visible = !@p_std
   endheading
   float param ypower
     caption="power"
     default=1
     visible = !@p_std
   endparam
   func yfunction
     caption="function"
     default=ident()
     visible = !@p_std
   endfunc
   complex param yweight
     caption="weight"
     default=1
     visible = !@p_std
   endparam
 }
 


Constructor Summary
JLB_BurningShipContraction()
           
 
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_BurningShipContraction

public JLB_BurningShipContraction()
Method Detail

Iterate

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