mt
Class MT_TrapShapeHarlequin
Object
common:Generic
common:TrapShape
mt:MT_TrapShapeHarlequin
class
- TrapShape:MT_TrapShapeHarlequin
Mark Townsend, April 2008
Ultra Fractal Source
Toggle UF Source Code Display
class MT_TrapShapeHarlequin(common.ulb:TrapShape) {
;
; Mark Townsend, April 2008
;
public:
float func Iterate(complex pz)
x = real(pz)
y = imag(pz)
complex a = @m * real(atan(y / x))
if @variation == 0
a = a * a + @c
a = fn1(1 - a) / a
elseif @variation == 1
a = a * a + @c
a = fn1(1 - a^2)
elseif @variation == 2
a = @m * (fn1(a + @c)^2 + fn2(a + @c)^2)
endif
m_LastZ = a
if @mode == 0
float d = abs(|pz| - |a|)
else
d = cabs(pz - a)
endif
return d
endfunc
default:
title = "Harlequin"
param variation
caption = "Variation"
enum = "1" "2" "3"
default = 1
endparam
param mode
caption = "Flavor"
enum = "1" "2"
default = 1
endparam
param m
caption = "Angle multiplier"
default = 2.0
endparam
param c
caption = "Harlequin seed"
default = (0,0)
endparam
func fn1
caption = "First function"
hint = "This function is used in all variations."
default = exp()
endfunc
func fn2
caption = "Second function"
hint = "This function is only used in variaton 3."
default = exp()
visible = @variation == "3"
endfunc
}
Method Summary |
float |
Iterate(complex pz)
call this for each iteration being trapped |
Methods inherited from class Object |
|
MT_TrapShapeHarlequin
public MT_TrapShapeHarlequin()
Iterate
public float Iterate(complex pz)
- Description copied from class:
TrapShape
- call this for each iteration being trapped
- Overrides:
Iterate
in class TrapShape