我正面临着使用F#绘制牛顿分形为f(x)= x ^ 3 - 1的问题.问题是我的程序似乎只绘制了分形右下角1/4而没有别的东西.由于实际绘制区域是正确的,我认为它可能与表单上的位图表示有关
这是我得到的图片的链接 https://imgur.com/a/YPSYIk9
到目前为止我提出的代码:
open System
open System.Drawing
open System.Windows.Forms
open System.Numerics
let pi = 3.14159265359
let MaxCount = 50
let multCol = 15
let Tol = 0.5
let r1 = Complex(1.0, 0.0)
let r2 = Complex(-0.5, sin(0.66*pi))
let r3 = Complex(-0.5, -sin(0.66 * pi))
let createImage () =
let image = new Bitmap (800, 800,System.Drawing.Imaging.PixelFormat.Format32bppPArgb)
let graphics = Graphics.FromImage(image)
let mutable maxMod = 0.0
for x = 0 to image.Width - 1 do
for …Run Code Online (Sandbox Code Playgroud)