# Fun Animations

**URL:** <https://discourse.julialang.org/t/fun-animations/45542>\
**Category:** Visualization\
**Created:** [August 26, 2020, 1:30am UTC](https://discourse.julialang.org/t/fun-animations/45542 "2020-08-26T01:30:58Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [November 24, 2020, 2:34pm UTC](https://discourse.julialang.org/t/fun-animations/45542/9 "2020-11-24T14:34:20Z")

</div>

> [@Seven Lines of Julia (examples sought)](https://discourse.julialang.org/t/seven-lines-of-julia-examples-sought/50416/42):
>
> With 15 lines I could write a code to perform a particle simulation with periodic boundary conditions, a langevin thermostat, and a quadratic potential between the particles, and produce an animation: using Plots ; ENV["GKSwstype"]="nul" const N, τ, Δt, λ, T, k = 100, 1000, 0.01, 1e-3, 0.26, 1e-6 const x, v, f = -0.5 .+ rand(3,N), -0.01 .+ 0.02\*randn(3,N), zeros(3,N) wrap(x,y) = (x-y) \> 0.5 ? (x-y)-1 : ( (x-y) \< -0.5 ? (x-y)+1 : (x-y) ) anim = @animate for t in 1:τ f .= 0 for i in 1:N-1, j…

---

_[View the full topic](https://discourse.julialang.org/t/fun-animations/45542)._
