TUTORIAL
Julia-Menge I |
|
|
|
. |
canvasmodus()
#{ Ausschnitt
#{ [ x0, x1, y0, y1 ] = [ -2, 2, -2, 2 ]
[ x0, x1, y0, y1 ] = [ -.8, 1.2, -1, 1 ]
[ cr, ci ] = [ -0.87, 0.222 ]
transform = (i,j) ->
[ (i/600)*(x1-x0)+(x1+x0)/2, (j/600)*(y1-y0)+(y1+y0)/2 ]
iter = 350
check = (i,j) ->
[ zr, zi ] = transform i, j
ctr = 0
während (ctr < iter) und (zr*zr + zi*zi < 5)
ctr += 1
[ zr, zi ] = [ zr*zr - zi*zi + cr, 2*zr*zi + ci]
ctr
für i in [-300..300]
für j in [-300..300]
c = check i,j
wenn c == iter
plotfarbe schwarz
sonst
plotfarbe [ '#004444', '#006666', '#008888', '#00AAAA', '#00CCCC', '#00EEEE' ][c % 6]
plot i,j |