WIP julia

This commit is contained in:
joachimschmidt557 2019-02-09 22:10:15 +01:00
parent 880370c5e6
commit a0b4e19007
8 changed files with 10 additions and 6 deletions

View file

@ -6,12 +6,15 @@ open System.Drawing
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 =
if i >= maxIter then i
else if Complex.Abs(z) >= (float rMax) then i
//else findI (i+1) (z*z+c)
else findI (i+1) (Complex.Add(c, (Complex.Multiply(z, z))))
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