summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-26 00:20:22 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-26 00:20:22 -0400
commit2a174cf7a918637af3f84bf47b2f720dcbc742fe (patch)
tree8cbeb35ad21272bf59af3feda1cf85fe0fbf7bb7 /examples
parent3848e2ece1caabc66af3881599e570d752957888 (diff)
downloadjulia-fractals-2a174cf7a918637af3f84bf47b2f720dcbc742fe.tar.gz
julia-fractals-2a174cf7a918637af3f84bf47b2f720dcbc742fe.zip
refactor
this should be able to support both mandelbrot and julia sets
Diffstat (limited to 'examples')
-rw-r--r--examples/mandelbrot.jl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/mandelbrot.jl b/examples/mandelbrot.jl
index b127d45..b580478 100644
--- a/examples/mandelbrot.jl
+++ b/examples/mandelbrot.jl
@@ -2,19 +2,19 @@ using Tk
using Images
using ImageView
-using Fractal
+using FractalExplorer
iterations = 45
imgsize = 500
img = [ Color.HSV(0, 0, 0) for x=1:imgsize, y=1:imgsize ]
-m = Fractal.Mandelbrot{Float64}(imgsize)
+mandelbrot = FractalExplorer.Fractal{Float64}(imgsize)
imgc, imgslice = view(img)
for i = 1:iterations
- Fractal.step(m)
- new_pixels = (abs(m.z) .> 2) & (img .== Color.HSV(0, 0, 0))
+ FractalExplorer.step(mandelbrot)
+ new_pixels = (abs(mandelbrot.z) .> 2) & (img .== Color.HSV(0, 0, 0))
img[new_pixels] = Color.HSV(i * 360/iterations, 1, 1)
view(imgc, img)
end