jlb
Class JLB_NewtonUserTransform
Object
common:Generic
common:Transform
common:UserTransform
jlb:JLB_NewtonUserTransform
class
- UserTransform:JLB_NewtonUserTransform
The Newton formula as a Transform.
Ultra Fractal Source
Toggle UF Source Code Display
class JLB_NewtonUserTransform(common.ulb:UserTransform) {
; 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_NewtonUserTransform
caption = "Version (Newton_UserTransform)"
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_NewtonUserTransform < 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
}
Methods inherited from class Object |
|
JLB_NewtonUserTransform
public JLB_NewtonUserTransform()
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