mmf Class MMF_UserFormulaTransform

Object
common:Generic
common:Transform
common:UserTransform
mmf:MMF_UserFormulaTransform

class
UserTransform:MMF_UserFormulaTransform

A roll-your-own formula

Ultra Fractal Source
class MMF_UserFormulaTransform(common.ulb:UserTransform) {
; A roll-your-own formula<br>
public:
import "common.ulb"

; @param pparent the parent, generally "this" for the parent, or zero
func MMF_UserFormulaTransform(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc

complex func Iterate(complex pz)
;    m_Iterations = m_Iterations + 1 not used in this transform
complex z1 = @p_coeff1*@p_func1(pz)^@p_power1
if @p_numterms>0
z1 = z1 + @p_coeff2*@p_func2(pz)^@p_power2
endif
if @p_numterms>1
z1 = z1 + @p_coeff3*@p_func3(pz)^@p_power3
endif
if @p_numterms>2
z1 = z1 + @p_coeff4*@p_func4(pz)^@p_power4
endif
if @p_numterms>3
z1 = z1 + @p_coeff5*@p_func5(pz)^@p_power5
endif
if @p_numterms>4
z1 = z1 + @p_coeff6*@p_func6(pz)^@p_power6
endif
if @p_numterms>5
z1 = z1 + @p_coeff7*@p_func7(pz)^@p_power7
endif
if @p_numterms>6
z1 = z1 + @p_coeff8*@p_func8(pz)^@p_power8
endif
if @p_numterms>7
z1 = z1 + @p_coeff9*@p_func9(pz)^@p_power9
endif
if @p_numterms>8
z1 = z1 + @p_coeff10*@p_func10(pz)^@p_power10
endif
return z1
endfunc

default:
title = "User Formula Transform"
int param p_numterms
caption = "Number of Terms"
enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
default = 0
endparam
text = "The first term."
complex param p_coeff1
caption = "Coefficient 1"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
endparam
func p_func1
caption = "Function 1"
default = ident()
hint = "The function, f, in c*f(z)^p."
endfunc
complex param p_power1
caption = "Power 1"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
endparam
text = "The second term."
visible = @p_numterms>0
complex param p_coeff2
caption = "Coefficient 2"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>0
endparam
func p_func2
caption = "Function 2"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>0
endfunc
complex param p_power2
caption = "Power 2"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>0
endparam
text = "The third term."
visible = @p_numterms>1
complex param p_coeff3
caption = "Coefficient 3"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>1
endparam
func p_func3
caption = "Function 3"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>1
endfunc
complex param p_power3
caption = "Power 3"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>1
endparam
text = "The fourth term."
visible = @p_numterms>2
complex param p_coeff4
caption = "Coefficient 4"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>2
endparam
func p_func4
caption = "Function 4"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>2
endfunc
complex param p_power4
caption = "Power 4"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>2
endparam
text = "The fifth term."
visible = @p_numterms>3
complex param p_coeff5
caption = "Coefficient 5"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>3
endparam
func p_func5
caption = "Function 5"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>3
endfunc
complex param p_power5
caption = "Power 5"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>3
endparam
text = "The sixth term."
visible = @p_numterms>4
complex param p_coeff6
caption = "Coefficient 6"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>4
endparam
func p_func6
caption = "Function 6"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>4
endfunc
complex param p_power6
caption = "Power 6"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>4
endparam
text = "The seventh term."
visible = @p_numterms>5
complex param p_coeff7
caption = "Coefficient 7"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>5
endparam
func p_func7
caption = "Function 7"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>5
endfunc
complex param p_power7
caption = "Power 7"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>5
endparam
text = "The eighth term."
visible = @p_numterms>6
complex param p_coeff8
caption = "Coefficient 8"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>6
endparam
func p_func8
caption = "Function 8"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>6
endfunc
complex param p_power8
caption = "Power 8"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>6
endparam
text = "The ninth term."
visible = @p_numterms>7
complex param p_coeff9
caption = "Coefficient 9"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>7
endparam
func p_func9
caption = "Function 9"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>7
endfunc
complex param p_power9
caption = "Power 9"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>7
endparam
text = "The tenth term."
visible = @p_numterms>8
complex param p_coeff10
caption = "Coefficient 10"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>8
endparam
func p_func10
caption = "Function 10"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>8
endfunc
complex param p_power10
caption = "Power 10"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>8
endparam
}

Constructor Summary
MMF_UserFormulaTransform()

MMF_UserFormulaTransform(Generic pparent)

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

MMF_UserFormulaTransform

public MMF_UserFormulaTransform(Generic pparent)
Parameters:
pparent - the parent, generally "this" for the parent, or zero

MMF_UserFormulaTransform

public MMF_UserFormulaTransform()
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 - the complex value to be transformed
Returns:
the transformed value