mt
Class MT_BarnsleyTransform
Object
common:Generic
common:Transform
common:UserTransform
mt:MT_BarnsleyTransform
class
- UserTransform:MT_BarnsleyTransform
Mark Townsend, May 2008
Ultra Fractal Source
Toggle UF Source Code Display
class MT_BarnsleyTransform(common.ulb:UserTransform) {
;
; Mark Townsend, May 2008
;
public:
func MT_BarnsleyTransform(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc
complex func Iterate(complex pz)
m_Iterations = m_Iterations + 1
int iter = 0
complex z = pz
while iter < @max_iter
if real(z) * imag(@start) + real(@start) * imag(z) >= 0
z = (z - 1) * @start
else
z = (z + 1) * @start
endif
iter = iter + 1
endwhile
return z
endfunc
default:
title = "Barnsley"
param start
caption = "Julia Seed"
hint = "This is the Julia seed for the Barnsley fractal."
default = (0.6, 1.1)
endparam
param max_iter
caption = "Iterations"
hint = "This is the number of iterations to \
calculate the Barnsley fractal."
default = 10
endparam
}
Methods inherited from class Object |
|
MT_BarnsleyTransform
public MT_BarnsleyTransform(Generic pparent)
MT_BarnsleyTransform
public MT_BarnsleyTransform()
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