jlb
Class JLB_NewtonUtilityTransform

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:UtilityTransform
              extended by jlb:JLB_NewtonUtilityTransform

class 
UtilityTransform:JLB_NewtonUtilityTransform

The Newton formula as a Transform.


Ultra Fractal Source

Toggle UF Source Code Display

 class JLB_NewtonUtilityTransform(common.ulb:UtilityTransform) {
 ; The Newton formula as a Transform.
  public:
 
   ; @param pz
   ; @return the new pz
   complex func Iterate(complex pz)
     if (@p_std)
       return (2*sqr(pz)*pz+1)/(3*sqr(pz))
     else
       return pz*(1-@relax) + \
              @relax * ((@p_power - 1) * pz^@p_power + @r) / \
              (@p_power * pz ^ (@p_power - 1))
     endif
   endfunc
 
 default:
   title = "Newton"
   int param v_NewtonUtilityTransform
      caption = "Version (Newton_UtilityTransform)"
      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_NewtonUtilityTransform < 100
   endparam
   bool param p_std
     caption = "Standard"
     default = true
   endparam
 
   complex param p_power
     caption = "Exponent"
     default = (3,0)
     hint = "Specifies the exponent of the equation that is solved by \
             Newton's method. Use real numbers (set the imaginary part \
             to zero) to obtain classic Newton fractals."
     visible = !@p_std
   endparam
   param r
     caption = "Root"
     default = (1,0)
     hint = "Specifies the root of the equation that is solved. Use larger \
             numbers for slower convergence."
     visible = !@p_std
   endparam
   param relax
     caption = "Relaxation"
     default = (1,0)
     hint = "This can be used to alter the convergence of \
             the formula."
     visible = !@p_std
   endparam
 }
 


Constructor Summary
JLB_NewtonUtilityTransform()
           
 
Method Summary
 complex Iterate(complex pz)
          Transform a single point within a sequence
 
Methods inherited from class common:Transform
Init, IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

JLB_NewtonUtilityTransform

public JLB_NewtonUtilityTransform()
Method Detail

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 -
Returns:
the new pz