Julia-mandelbrot

using CairoMakie

function mandelbrot(x, y)

    z = c = x + y*im

    for i in 1:30.0; abs(z) > 2 && return i; z = z^4 + c; end; 0

end

heatmap(-2:0.1:1, -1.1:0.1:1.1, mandelbrot,

    colormap = Reverse(:greens))


你可能感兴趣的:(Julia-mandelbrot)