Standard Class Standard_NovaMandel

```Object
common:Generic
common:Formula
common:ConvergentFormula
Standard:Standard_NovaMandel
```

`class ConvergentFormula:Standard_NovaMandel`

Object version of NovaMandel in Standard.ufm. Nova fractal (Mandelbrot 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. Originally written by Damien M. Jones

Ultra Fractal Source
``` class Standard_NovaMandel(common.ulb:ConvergentFormula) {
;
; Object version of NovaMandel in Standard.ufm.
;
; Nova fractal (Mandelbrot 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.
;
; Originally written by Damien M. Jones
;
public:
complex func Init(complex pz)
ConvergentFormula.Init(pz)
fPixel = pz
return @start
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) + fPixel
else
return pz - @relax * (pz^@p_power-1) / (@p_power * pz^(@p_power-1)) + fPixel
endif
endfunc

private:
complex fPixel

default:
title = "Nova (Mandelbrot)"
helpfile = "Uf*.chm"
helptopic = "Html/formulas/standard/nova.html"
rating = recommended
param start
caption = "Start Value"
default = (1,0)
hint = "Starting value for each point.  You can use this to \
'perturb' the fractal."
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 Mandelbrot-type fractal."
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_NovaMandel()`

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_NovaMandel

`public Standard_NovaMandel()`
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