diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-25 09:53:41 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-25 09:53:41 -0400 |
commit | 264fa55dcf2d72d8ddf0bb6fd96be29e4e57d666 (patch) | |
tree | 1e2e0876bea680b22d83b1e16e5341968f04d4f5 /examples | |
parent | 35c239e4b7ab489961a0029a53b505921f230244 (diff) | |
download | julia-fractals-264fa55dcf2d72d8ddf0bb6fd96be29e4e57d666.tar.gz julia-fractals-264fa55dcf2d72d8ddf0bb6fd96be29e4e57d666.zip |
start refactoring this into a class
Diffstat (limited to 'examples')
-rw-r--r-- | examples/mandelbrot.jl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/mandelbrot.jl b/examples/mandelbrot.jl index 417291d..ab618d4 100644 --- a/examples/mandelbrot.jl +++ b/examples/mandelbrot.jl @@ -8,14 +8,13 @@ iterations = 45 imgsize = 500 img = [ Color.HSV(0, 0, 0) for x=1:imgsize, y=1:imgsize ] -c = Fractal.complexplane(4.0, imgsize) -z = c +m = Fractal.Mandelbrot(imgsize) imgc, imgslice = view(img) for i = 1:iterations - z = Fractal.mandelbrot(z, c) - img[abs(z) .> 2] = Color.HSV(i * 360/iterations, 1, 1) + Fractal.step(m) + img[abs(m.z) .> 2] = Color.HSV(i * 360/iterations, 1, 1) view(imgc, img) end |