reb
Class REB_TrapShapeLatoocarfian
Object
common:Generic
common:TrapShape
reb:REB_TrapShapeLatoocarfian
class
- TrapShape:REB_TrapShapeLatoocarfian
This shape uses the Latoocarfian strange attractor
Ultra Fractal Source
Toggle UF Source Code Display
class REB_TrapShapeLatoocarfian(common.ulb:TrapShape) {
; This shape uses the Latoocarfian strange attractor
public:
import "common.ulb"
; Constructor
func REB_TrapShapeLatoocarfian(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 pxx = 0
int att_iter = 0
while att_iter < @max_att_iterations
pxx = x
x = sin(y*@h2) + @h3*sin(x*@h2)
y = sin(pxx*@h1) + @h4*sin(y*@h1)
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 = "Latoocarfian"
int param v_trapshapelatoocarfian
caption = "Version (Trap Shape Latoocarfian)"
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_trapshapelatoocarfian < 101
endparam
float param h1
caption = "Latoocarfian 1"
default = -1
endparam
float param h2
caption = "Latoocarfian 2"
default = 2.9
endparam
float param h3
caption = "Latoocarfian 3"
default = 0.8
endparam
float param h4
caption = "Latoocarfian 4"
default = 0.7
endparam
float param distscale
caption = "Distance scale"
default = 10.0
endparam
float param s
caption = "Attractor scale"
default = 0.05
endparam
int param max_att_iterations
caption = "Attractor iterations"
default = 20
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_TrapShapeLatoocarfian
public REB_TrapShapeLatoocarfian(Generic pparent)
- Constructor
REB_TrapShapeLatoocarfian
public REB_TrapShapeLatoocarfian()
Iterate
public float Iterate(complex pz)
- Call this for each iteration being trapped.
- Overrides:
Iterate
in class TrapShape