From 5d6d74da6c8b2114efd7127666442a388f7f1389 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 24 Oct 2014 11:14:49 -0400 Subject: also factor out the image size --- fractal.jl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fractal.jl b/fractal.jl index c12400b..d1c1c13 100644 --- a/fractal.jl +++ b/fractal.jl @@ -3,12 +3,16 @@ using Images using ImageView iterations = 90 +imgsize = 1000 mandelbrot(z, c) = z.^2 + c -img = [ Color.HSV(0, 0, 0) for x=1:1000, y=1:1000 ] -c = [ x + y*im for x=linspace(-2, 2, 1000), y=linspace(-2, 2, 1000) ] -z = c +img = [ Color.HSV(0, 0, 0) for x=1:imgsize, y=1:imgsize ] +c = [ + x + y*im + for x=linspace(-2.0, 2.0, imgsize), y=linspace(-2.0, 2.0, imgsize) +] +z = c imgc, imgslice = view(img) -- cgit v1.2.3-54-g00ecf