This commit is contained in:
joachimschmidt557 2019-02-10 11:19:45 +01:00
parent 8cc11ea130
commit 4b94f8c089
12 changed files with 24 additions and 4 deletions

View file

@ -4,6 +4,16 @@ open System
open System.Numerics
open System.Drawing
let colorMap i nMax =
let h =
if ((float (i % 256)) / 255.0) <= 1.0 then
((float (i % 256)) / 255.0) * 360.0
else 360.0
let s = 0.6
let v = if i < nMax then 1.0 else 0.0
MandelBrot.hsbToRgb h s v
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)
@ -16,7 +26,7 @@ let generatePixel x y height width zoom rMax maxIter =
let newIm = 2.0 * c.Real * c.Imaginary
findI (i+1) (Complex(newRe, newIm)+z)
MandelBrot.colorMap (findI 0 c) maxIter
colorMap (findI 0 c) maxIter
let generate (width:int) height zoom rMax maxIter =
let result = new Bitmap(width, height)