- UID
- 7
- 帖子
- 2888
- 精华
- 10
- 积分
- 2836
|
这个结果很有诱惑力,可是没办法完成:
pgd_Twofold2_Julia {
; Two-fold rotational symmetry and complementary critical
; point fates make for some very intertwining (and
; entertaining) Julia sets.
; f(z) = (z^2 - 1/3)/cz^3
global:
bool foundatt1 = false
bool foundatt2 = true
complex att1 = 1
complex att2 = -1
float b = 1/@bailout
int j = 0
; Locate attractor 1 goes to, if any.
WHILE (j < #maxit)
att1 = (sqr(att1) - 1/3)/(@seed * sqr(att1) * att1)
j = j + 1
ENDWHILE
; Is it really an attractor? Or did it just wander off
; and die somewhere? Is the attractor self-complementary
; or is there a distinct mirror attractor?
j = 0
complex a = att1
WHILE (j < #maxit)
att1 = (sqr(att1) - 1/3)/(@seed * sqr(att1) * att1)
IF (|att1 - a| < b)
foundatt1 = true ; it repeated, yay!
ENDIF
att2 = (sqr(att2) - 1/3)/(@seed * sqr(att2) * att2)
IF (|att2 - a| < b)
foundatt2 = false ; other cp went to same.
ENDIF
j = j + 1
ENDWHILE
init:
z = #pixel
bool notdone = true
bool landedright = false
IF ((@what == 1) && (!foundatt1))
notdone = false
ENDIF
IF ((@what == 2) && (!foundatt2))
notdone = false
ENDIF
i = 0
loop:
z = (sqr(z) - 1/3)/(@seed * sqr(z) * z)
IF (|z| > @bailout)
notdone = false
landedright = (@what == 0)
ENDIF
IF (foundatt1)
IF (|z - att1| < b)
notdone = false
landedright = (@what == 1)
ENDIF
ENDIF
IF (foundatt2)
IF (|z - att2| < b)
notdone = false
landedright = (@what == 2)
ENDIF
ENDIF
IF (i == #maxit)
IF (@what != 3)
notdone = false
landedright = false
ENDIF
ENDIF
i = i + 1
IF (!notdone)
IF (!landedright)
z = (501,10) ; Tell Smooth (Generalized) 2 to color this thing solid.
ENDIF
ENDIF
bailout:
notdone
default:
title = "Twofold2 Julia"
periodicity = 0
maxiter = 1000
method = onepass
magn = 0.5
param seed
caption = "Julia seed"
default = (0.75, 0)
endparam
param what
caption = "Draw what"
enum = "Main basin" "Other attractor #1" "Other attractor #2" "Trapped points"
default = 0
endparam
param bailout
caption = "Bailout"
hint = "Escape radius (inverse is used for finite attractors)"
default = 100000.0
min = 0
endparam
switch:
type = "pgd_Twofold2_Mandel"
bailout = bailout
} |
|