reb
Class REB_TrapShapeQuadruptwo
Object
common:Generic
common:TrapShape
reb:REB_TrapShapeQuadruptwo
class
- TrapShape:REB_TrapShapeQuadruptwo
This shape uses the Quadruptwo strange attractor.
Ultra Fractal Source
Toggle UF Source Code Display
class REB_TrapShapeQuadruptwo(common.ulb:TrapShape) {
; This shape uses the Quadruptwo strange attractor.
public:
import "common.ulb"
; Constructor
func REB_TrapShapeQuadruptwo(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
if x != 0
x = y - x/abs(x)*sin(log(abs(@h2*x-@h3))) \
*atan(sqr(log(abs(@h3*x-@h2))))
else
x = y - sin(log(abs(@h2*x-@h3))) \
*atan(sqr(log(abs(@h3*x-@h2))))
endif
y = @h1 - pxx
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 = "Quadruptwo"
int param v_trapshapequadruptwo
caption = "Version (Trap Shape Quadruptwo)"
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_trapshapequadruptwo < 101
endparam
float param h1
caption = "Quadruptwo param 1"
default = 34
endparam
float param h2
caption = "Quadruptwo param 2"
default = 1
endparam
float param h3
caption = "Quadruptwo param 3"
default = 5
endparam
float param distscale
caption = "Distance scale"
default = 0.05
endparam
float param s
caption = "Attractor scale"
default = 15
endparam
int param max_att_iterations
caption = "Attractor iterations"
default = 4
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_TrapShapeQuadruptwo
public REB_TrapShapeQuadruptwo(Generic pparent)
- Constructor
REB_TrapShapeQuadruptwo
public REB_TrapShapeQuadruptwo()
Iterate
public float Iterate(complex pz)
- Call this for each iteration being trapped.
- Overrides:
Iterate
in class TrapShape