mt
Class MT_TrapShapePopcorn
Object
common:Generic
common:TrapShape
mt:MT_TrapShapePopcorn
class
- TrapShape:MT_TrapShapePopcorn
Mark Townsend, April 2008
Ultra Fractal Source
Toggle UF Source Code Display
class MT_TrapShapePopcorn(common.ulb:TrapShape) {
;
; Mark Townsend, April 2008
;
public:
float func Iterate(complex pz)
int i = 0
float x = real(pz)
float y = imag(pz)
while i < @max_iterations
float xx = x
x = x - @h * real(@fn1(y + @fn2(real(@a) * y)))
y = y - @h * real(@fn3(xx + @fn4(imag(@a) * xx)))
i = i + 1
endwhile
m_LastZ = x + flip(y)
return cabs(m_LastZ)
endfunc
default:
title = "Popcorn"
param a
caption = "Alpha"
default = (3.0, 3.0)
endparam
param h
caption = "Step Size"
default = 0.05
hint = "This is step size for the Popcorn formula."
endparam
param max_iterations
caption = "Iterations"
default = 3
min = 1
hint = "This is the number of iterations for the \
Popcorn formula."
endparam
func fn1
caption = "Re Popcorn #1"
default = sin()
endfunc
func fn2
caption = "Re Popcorn #2"
default = tan()
endfunc
func fn3
caption = "Im Popcorn #1"
default = sin()
endfunc
func fn4
caption = "Im Popcorn #2"
default = tan()
endfunc
}
Method Summary |
float |
Iterate(complex pz)
call this for each iteration being trapped |
Methods inherited from class Object |
|
MT_TrapShapePopcorn
public MT_TrapShapePopcorn()
Iterate
public float Iterate(complex pz)
- Description copied from class:
TrapShape
- call this for each iteration being trapped
- Overrides:
Iterate
in class TrapShape