reb
Class REB_TrapShapeHenon
Object
common:Generic
common:TrapShape
reb:REB_TrapShapeHenon
class
- TrapShape:REB_TrapShapeHenon
This shape uses the Henon strange attractor
Ultra Fractal Source
Toggle UF Source Code Display
class REB_TrapShapeHenon(common.ulb:TrapShape) {
; This shape uses the Henon strange attractor
public:
import "common.ulb"
; Constructor
func REB_TrapShapeHenon(Generic pparent)
TrapShape.TrapShape(pparent)
endfunc
; Call this for each iteration being trapped.
float func Iterate(complex pz)
int sgn = 1
if @sgn
sgn = -1
endif
float x = real(pz)*@s
float y = imag(pz)*@s
float pxx = 0
int att_iter = 0
while att_iter < @max_att_iterations
pxx = x
x = sin(@h1)*x - cos(@h1)*(y-x^2)
y = cos(@h1)*pxx + sin(@h1)*(y-pxx^2)
att_iter = att_iter + 1
endwhile
m_LastZ = (x + sgn*flip(y))
float d = @distscale*|pz-(x + sgn*flip(y))|
return d
endfunc
default:
title = "Henon"
int param v_trapshapehenon
caption = "Version (Trap Shape Henon)"
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_trapshapehenon < 101
endparam
float param h1
caption = "Henon param"
default = 1.5
endparam
float param distscale
caption = "Distance scale"
default = 5.0
endparam
float param s
caption = "Attractor scale"
default = 1.5
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_TrapShapeHenon
public REB_TrapShapeHenon(Generic pparent)
- Constructor
REB_TrapShapeHenon
public REB_TrapShapeHenon()
Iterate
public float Iterate(complex pz)
- Call this for each iteration being trapped.
- Overrides:
Iterate
in class TrapShape