109# changxde
这多出的东西,好象将上面代码再精简,就可得到你的这张图。我昨天在UF中试,得到过这个效果。昨晚再试,试不出来了。按下面代码,造出水平的一枝:
KochCurvecir {
init:
z = #pixel
float arg =0
bool bail = false
int i = 0
loop:
i = i + 1
if i > 1
if |z| < 1
bail = true
endif
arg = atan2(z)
if i > 2
if arg > 0
arg2 = 2*pi/3
else
arg2 = -2*pi/3
endif
endif
z = z*exp(-1i*arg2)
z = - @s*z + (1 +@s)
endif
bailout:
bail == false
default:
title = "Circly Koch Curve"
helpfile = "sam-help/kochcurves.htm"
magn = .5
center = (0.00021,0.0002)
maxiter = 50
periodicity = 0
param s
caption = "Magnification step"
default = 1.7
endparam
}
|