diff --git a/Julia.fs b/Julia.fs index 8e8e3d9..ee1ebdb 100644 --- a/Julia.fs +++ b/Julia.fs @@ -8,15 +8,15 @@ let generatePixel x y height width zoom rMax maxIter = let c = MandelBrot.getComplexValueForPixel (float x) (float y) (float height) (float width) zoom let z = Complex(-0.8, 0.156) - let rec findI i z = + let rec findI i c = if i >= maxIter then i - else if Complex.Abs(z) >= (float rMax) then i + else if Complex.Abs(c) >= (float rMax) then i else let newRe = c.Real*c.Real - c.Imaginary*c.Imaginary let newIm = 2.0 * c.Real * c.Imaginary findI (i+1) (Complex(newRe, newIm)+z) - MandelBrot.colorMap (findI 0 (Complex(0.0, 0.0))) maxIter + MandelBrot.colorMap (findI 0 c) maxIter let generate (width:int) height zoom rMax maxIter = let result = new Bitmap(width, height) diff --git a/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.dll b/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.dll index a359d81..783af9b 100644 Binary files a/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.dll and b/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.dll differ diff --git a/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb b/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb index 986da6d..14c7af9 100644 Binary files a/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb and b/bin/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb differ diff --git a/julia.bmp b/julia.bmp index 35e3696..6ae798d 100644 Binary files a/julia.bmp and b/julia.bmp differ diff --git a/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.dll b/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.dll index a359d81..783af9b 100644 Binary files a/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.dll and b/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.dll differ diff --git a/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb b/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb index 986da6d..14c7af9 100644 Binary files a/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb and b/obj/Debug/netcoreapp2.2/fsharp-mandelbrot.pdb differ