diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-24 10:51:20 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-24 10:51:20 -0400 |
commit | 41f1bc178dbc777f0913a877bef1ef85e22ea5ce (patch) | |
tree | f258d962cc12c008fab32e1b2b18ef287e30a489 | |
parent | 114422dfbb6c87c5beb7d78c52f1bffd38c3c356 (diff) | |
download | julia-fractals-41f1bc178dbc777f0913a877bef1ef85e22ea5ce.tar.gz julia-fractals-41f1bc178dbc777f0913a877bef1ef85e22ea5ce.zip |
pull the number of iterations out into a variable
-rw-r--r-- | fractal.jl | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2,6 +2,8 @@ using Tk using Images using ImageView +iterations = 90 + mandelbrot(z, c) = z.^2 + c img = [ Color.HSV(0, 0, 0) for x=1:1000, y=1:1000 ] @@ -10,9 +12,9 @@ z = c imgc, imgslice = view(img) -for i = 1:90 +for i = 1:iterations z = mandelbrot(z, c) - img[abs(z) .> 50] = Color.HSV(i * 4, 1, 1) + img[abs(z) .> 50] = Color.HSV(i * 360/iterations, 1, 1) view(imgc, img) end |