- UID
- 352
- 帖子
- 1321
- 精华
- 14
- 积分
- 2599
- 来自
- 河南永城
|
这样更简单些
KochCurvecir {
init:
z = #pixel
int n=0
loop:
n = n+1
arg = atan2(z)
arg2 = 2*pi/3*round(3*arg/(2*pi))
if n > 1 && arg2 == 0
arg2 = 2*pi/3
endif
if |z|>1
z = z*exp(-1i*arg2)
z = - @s*z + (1 +@s)
endif
bailout:
|z|>1
default:
title = "Circly Koch Curve"
helpfile = "sam-help/kochcurves.htm"
magn = .5
center = (0.00021,0.0002)
maxiter = 20
periodicity = 0
param s
caption = "Magnification step"
default = 1.7
endparam
} |
|