# Seven Lines of Julia (examples sought)

**URL:** <https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416>\
**Category:** General Usage\
**Created:** [November 19, 2020, 7:37am UTC](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416 "2020-11-19T07:37:29Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 24, 2020, 11:38pm UTC](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416/45 "2020-11-24T23:38:52Z")

</div>

@FedericoStra, found interesting to perform a zoom-in loop and recompute your fractal and to use animated gif technique shown by @lmiq to create:  
 ![mandelbrot_zooms](https://global.discourse-cdn.com/julialang/original/3X/c/0/c02ab8c00f8faeb31a1c425386c6a53f7d411fd1.gif)

```julia
xc, yc = -0.55, 0.61; 
x0, x1 = xc - 2, xc + 2; y0, y1 = yc - 2, yc + 2;
anim = @animate for t in 1:50
    x, y = range(x0, x1; length=1000), range(y0, y1; length=1000)
    heatmap(x, y, -log.(mandelbrot.(x' .+ y .* im));aspect_ratio=1,border=:none,legend=:none);
    x0, x1 = (15x0 + x1)/16, (15x1 + x0)/16; y0, y1 = (15y0 + y1)/16, (15y1 + y0)/16 
end
gif(anim,"mandelbrot_zooms.gif",fps=10)

```

---

_[View the full topic](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416)._
