Standard
Class Standard_Newton
Object
common:Generic
common:Formula
common:ConvergentFormula
Standard:Standard_Newton
class
- ConvergentFormula:Standard_Newton
Object version of Newton in Standard.ufm.
Standard Newton fractal.
Ultra Fractal Source
Toggle UF Source Code Display
class Standard_Newton(common.ulb:ConvergentFormula) {
;
; Object version of Newton in Standard.ufm.
; Standard Newton fractal.
;
public:
complex func Init(complex pz)
ConvergentFormula.Init(pz)
return pz
endfunc
complex func Iterate(complex pz)
ConvergentFormula.Iterate(pz)
return ((@p_power - 1) * pz^@p_power + @r) / (@p_power * pz ^ (@p_power - 1))
endfunc
default:
title = "Newton"
helpfile = "Uf*.chm"
helptopic = "Html/formulas/standard/newton.html"
rating = recommended
param p_power ; Overrides p_power from Formula
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."
endparam
param r
caption = "Root"
default = (1,0)
hint = "Specifies the root of the equation that is solved. Use larger \
numbers for slower convergence."
endparam
param p_bailout ; Overrides p_bailout from ConvergentFormula
caption = "Bailout value"
default = 0.00001
min = 0
exponential = true
hint = "This parameter defines how soon a convergent orbit bails out while \
iterating. Smaller values give more precise results but usually \
require more iterations."
endparam
}
Methods inherited from class Object |
|
Standard_Newton
public Standard_Newton()
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