mt
Class MT_PopcornTransform
Object
common:Generic
common:Transform
common:UserTransform
mt:MT_PopcornTransform
class
- UserTransform:MT_PopcornTransform
Mark Townsend, May 2008
Ultra Fractal Source
Toggle UF Source Code Display
class MT_PopcornTransform(common.ulb:UserTransform) {
;
; Mark Townsend, May 2008
;
public:
func MT_PopcornTransform(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc
complex func Iterate(complex pz)
m_Iterations = m_Iterations + 1
int i = 0
pz = pz * recip(@scale) - @center
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
return x + flip(y)
endfunc
default:
title = "Popcorn"
param center
caption = "Center"
default = (0, 0)
endparam
float param scale
caption = "Scale"
default = 1
endparam
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
}
Methods inherited from class Object |
|
MT_PopcornTransform
public MT_PopcornTransform(Generic pparent)
MT_PopcornTransform
public MT_PopcornTransform()
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