summaryrefslogtreecommitdiffstats
path: root/fractal.jl
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-24 11:45:40 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-24 11:45:40 -0400
commit35c239e4b7ab489961a0029a53b505921f230244 (patch)
tree2d3bb08ba6397144417835f44a16249fc51c7adb /fractal.jl
parent1bcf21a6fda4164c2002975b4f3e0f6786abd84d (diff)
downloadjulia-fractals-35c239e4b7ab489961a0029a53b505921f230244.tar.gz
julia-fractals-35c239e4b7ab489961a0029a53b505921f230244.zip
start factoring out into modules
Diffstat (limited to 'fractal.jl')
-rw-r--r--fractal.jl39
1 files changed, 0 insertions, 39 deletions
diff --git a/fractal.jl b/fractal.jl
deleted file mode 100644
index f812f30..0000000
--- a/fractal.jl
+++ /dev/null
@@ -1,39 +0,0 @@
-using Tk
-using Images
-using ImageView
-
-iterations = 90
-imgsize = 1000
-
-mandelbrot(z, c) = z.^2 + 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)
-
-for i = 1:iterations
- z = mandelbrot(z, c)
- img[abs(z) .> 2] = Color.HSV(i * 360/iterations, 1, 1)
- view(imgc, img)
-end
-
-#If we are not in a REPL
-if (!isinteractive())
-
- # Create a condition object
- cv = Condition()
-
- # Get the main window (A Tk toplevel object)
- win = toplevel(imgc)
-
- # Notify the condition object when the window closes
- bind(win, "<Destroy>", e->notify(cv))
-
- # Wait for the notification before proceeding ...
- wait(cv)
-end