Mandelbrot set: Difference between revisions

(→‎Mandelbrot Set with Julia Animation: Added: e^(-|z|)-Smoothing)
Line 5,252:
 
===Mandelbrot Set with Julia Animation===
This is just a translationmodification of the corresponding R section.
<lang julia>using Plots
gr(aspect_ratio=:equal, legend=false, dpi=250)
 
d = 800 # pixel density (= image width)
h = 600 # image height
 
x = range(-1.0, 1.0, length=d+1)
y = range(-h/d, h/d, length=h+1)
 
C = 2.0 * (x' .+ y * im) .- 0.5
Z, S = zero(C), zeros(size(C))
animanim1 = Animation()
anim2 = Animation()
 
anim = Animation()
for k = 1:20
global Z = Z .^ 2 + C
global S = S + exp.(-abs.(Z))
heatmap(exp.(-abs.(Z)), c=:jet)
frame(animanim1)
heatmap(S, c=:jet)
frame(anim2)
end
 
gif(animanim1, "Mandelbrot_animationMandelbrot_anim1.gif", fps=1)</lang>
gif(anim2, "Mandelbrot_anim2.gif", fps=1)</lang>
 
===Normalized Iteration Count, Distance Estimation and Mercator Maps===
305

edits