reb
Class REB_TrapShapePickover
Object
common:Generic
common:TrapShape
reb:REB_TrapShapePickover
class
- TrapShape:REB_TrapShapePickover
This shape uses the Pickover strange attractor
Ultra Fractal Source
Toggle UF Source Code Display
class REB_TrapShapePickover(common.ulb:TrapShape) {
; This shape uses the Pickover strange attractor
public:
import "common.ulb"
; Constructor
func REB_TrapShapePickover(Generic pparent)
TrapShape.TrapShape(pparent)
endfunc
; Call this for each iteration being trapped.
float func Iterate(complex pz)
TrapShape.Iterate(pz)
int sgn = 1
if @sgn
sgn = -1
endif
float x = real(pz)*@s
float y = imag(pz)*@s
float ppz = @ppz
float pxx = 0
int att_iter = 0
while att_iter < @max_att_iterations
pxx = x
x = real(@pfun1(y*@h1) - ppz*@pfun2(x*@h2))
y = real(ppz*@pfun3(pxx*@h3) - @pfun4(y*@h4))
ppz = real(@h5*@pfun5(pxx))
att_iter = att_iter + 1
endwhile
m_LastZ = (x + sgn*flip(y)+ppz*@pw)
float d = @distscale*|pz-(x + sgn*flip(y) + ppz*@pw)|
return d
endfunc
default:
title = "Pickover"
int param v_trapshapepickover
caption = "Version (Trap Shape Pickover)"
default = 101
hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
visible = @v_trapshapepickover < 101
endparam
float param ppz
caption = "Initialize Height"
default = 0
endparam
complex param pw
caption = "Height weight"
default = (0,0)
endparam
float param h1
caption = "Pickover 1"
default = 2.24
endparam
float param h2
caption = "Pickover 2"
default = 0.43
endparam
float param h3
caption = "Pickover 3"
default = -0.65
endparam
float param h4
caption = "Pickover 4"
default = -2.43
endparam
float param h5
caption = "Pickover 5"
default = 1
endparam
func pfun1
caption = "Pickover Fn 1"
default = sin()
endfunc
func pfun2
caption = "Pickover Fn 2"
default = cos()
endfunc
func pfun3
caption = "Pickover Fn 3"
endfunc
func pfun4
caption = "Pickover Fn 4"
default = cos()
endfunc
func pfun5
caption = "Pickover Fn 5"
default = sin()
endfunc
float param distscale
caption = "Distance scale"
default = 2
endparam
float param s
caption = "Attractor scale"
default = 1
endparam
int param max_att_iterations
caption = "Attractor iterations"
default = 5
endparam
bool param sgn
caption = "Conjugate transform"
default = false
endparam
}
Method Summary |
float |
Iterate(complex pz)
Call this for each iteration being trapped. |
Methods inherited from class Object |
|
REB_TrapShapePickover
public REB_TrapShapePickover(Generic pparent)
- Constructor
REB_TrapShapePickover
public REB_TrapShapePickover()
Iterate
public float Iterate(complex pz)
- Call this for each iteration being trapped.
- Overrides:
Iterate
in class TrapShape