Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.36 KB

File metadata and controls

21 lines (14 loc) · 1.36 KB

flow-animation-with-scipy-odeint

This script has been created just for fun. It creates an animation of a flow of particles (or points) whose trajectory has been calculated using the odeint function from the scipy.integrate sub-package.

The following animation can be obtained using the default acceleration field definition from the script.

The acceleration field that acts on each particle and generates the animation above is given by

$$ \vec{a} = (a_x, a_y) \quad \longrightarrow \quad \begin{array}{c} a_x = -\cos(y)\sin(x)\\ a_y=-\sin(y)\cos(x) \end{array} $$

For the making of the script the following references have been consulted:

  1. Docs.scipy.org. 2020. Scipy.Integrate.Odeint — Scipy V1.5.2 Reference Guide. [online]

  2. Correoso, K., 2014. Microentrada: Rendimiento De Scatterplots En Matplotlib – Pybonacci. [online] Pybonacci.org.