Skip to content

Instantly share code, notes, and snippets.

@jkrumbiegel
Created July 7, 2022 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkrumbiegel/1c1bc92cac9f06365d619b0f65142562 to your computer and use it in GitHub Desktop.
Save jkrumbiegel/1c1bc92cac9f06365d619b0f65142562 to your computer and use it in GitHub Desktop.
using CairoMakie
using Makie.GeometryBasics
function mandelbrot(x, y)
z = c = x + y*im
for i in 1:50.0; abs(z) > 2 && return log(50 - i); z = z^2 + c; end; 0.0
end
# r = Rect(-0.74250066, 0.39089617, 0.43069285, 0.34233275)
r = HyperRectangle{2, Float32}(Float32[-0.62557947, 0.6001665], Float32[0.056850735, 0.041836016])
x = first.(extrema(r))
y = last.(extrema(r))
f, ax, s = heatmap(range(x..., length = 600), range(y..., length = 600), mandelbrot,
colormap = :Blues, shading = false, axis = (type = Axis, xautolimitmargin = (0, 0), yautolimitmargin = (0, 0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment