diff --git a/README.md b/README.md index 65efb96..5dfe3b9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Then generate the fractal using the pseudomandelbrot function ```julia include("src/fractal.jl") -mandel(img, -3-2im, 2+2im) +mandel(img, -0.53+0.60im, -0.51+0.62im) ``` The coördinates specified are the bottom left and top right, respectively. diff --git a/src/fractal.jl b/src/fractal.jl index a6d19a5..9165781 100644 --- a/src/fractal.jl +++ b/src/fractal.jl @@ -18,6 +18,9 @@ function is_stable(m, z1, z2, c) y1 = imag(z1) x2 = real(z2) y2 = imag(z2) + u = (real(c) - x1) / (x2 - x1) + v = (imag(c) - y1) / (y2 - y1) + f = sample(m, u, v) z = c for _ in 1:iter r = abs(z) @@ -29,7 +32,7 @@ function is_stable(m, z1, z2, c) v = (imag(z) - y1) / (y2 - y1) f = sample(m, u, v) if f < 0.5 - z = z^2/8 + c + z = z^2*0.99 + c else z = z^2 + c end