Standard
Class Standard_NovaJulia

Object
  extended by common:Generic
      extended by common:Formula
          extended by common:ConvergentFormula
              extended by Standard:Standard_NovaJulia

class 
ConvergentFormula:Standard_NovaJulia

Object version of NovaJulia in Standard.ufm. Nova fractal (Julia form), a modified Newtonian-style fractal. The formula was first shown to me by Paul Derbyshire (who named it Nova). It has also appeared elsewhere under other names. If you leave the Julia seed at the default (0,0), you can use this as a general Newton-style fractal as in FractInt. Originally written by Damien M. Jones.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_NovaJulia(common.ulb:ConvergentFormula) {
 ;
 ; Object version of NovaJulia in Standard.ufm.
 ;
 ; Nova fractal (Julia form), a modified Newtonian-style fractal.
 ; The formula was first shown to me by Paul Derbyshire (who named it
 ; Nova). It has also appeared elsewhere under other names. If you
 ; leave the Julia seed at the default (0,0), you can use this as a
 ; general Newton-style fractal as in FractInt.
 ;
 ; Originally written by Damien M. Jones.
 ;
 public:
   complex func Init(complex pz)
     ConvergentFormula.Init(pz)
     return pz
   endfunc
 
   complex func Iterate(complex pz)
     ConvergentFormula.Iterate(pz)
     if @p_power == (3, 0)  ; special optimized routine for power 3
       complex zsquared = sqr(pz)
       complex zcubed = zsquared * pz
       return pz - @relax * (zcubed-1) / (3*zsquared) + @seed
     else
       return pz - @relax * (pz^@p_power-1) / (@p_power * pz^(@p_power-1)) + @seed
     endif
   endfunc
 
 default:
   title = "Nova (Julia)"
   helpfile = "Uf*.chm"
   helptopic = "Html/formulas/standard/nova.html"
   rating = recommended
   param seed
     caption = "Julia Seed"
     default = (0,0)
     hint = "This is the Julia seed, a constant parameter which \
             defines the shape of the fractal. Use the Explore or Eyedropper \
             features to find interesting values."
   endparam
   param p_power ; Overrides p_power from Formula
     caption = "Exponent"
     default = (3,0)
     hint = "Overall exponent for the equation. The value (3,0) gives \
             the classic Nova type."
   endparam
   param p_bailout ; Overrides p_bailout from ConvergentFormula
     caption = "Bailout"
     default = 0.00001
     exponential = true
     hint = "Bailout value; smaller values will cause more \
             iterations to be done for each point."
   endparam
   param relax
     caption = "Relaxation"
     default = (1,0)
     hint = "This can be used to slow down the convergence of \
             the formula."
   endparam
 }
 


Constructor Summary
Standard_NovaJulia()
           
 
Method Summary
 complex Init(complex pz)
          Set up for a sequence of values
 complex Iterate(complex pz)
          Produce the next value in the sequence
 
Methods inherited from class common:ConvergentFormula
GetLowerBailout, IsBailedOut
 
Methods inherited from class common:Formula
GetPrimaryExponent, GetUpperBailout
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_NovaJulia

public Standard_NovaJulia()
Method Detail

Init

public complex Init(complex pz)
Description copied from class: ConvergentFormula
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).

Overrides:
Init in class ConvergentFormula
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)
Description copied from class: ConvergentFormula
Produce the next value in the sequence

As long as the sequence has not bailed out, this function will be continually called to produce sequence values.

Overrides:
Iterate in class ConvergentFormula
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