This repo holds the code for my medium article on animating Fourier series.
To install the requirements:
pip install -r requirements.txt
The directory structure for the repo: ‡‡
βββ arrow_animation.py β‘ arrow animation generation script.
βββ evolution_demo.py β‘ evolution animation generation script.
βββ core β‘ core scripts and modules.
β βββ fourier_drawer.py β‘ for drawing Fourier coefficients using opencv
β βββ fourier_numerical_approximator.py β‘ finding coefficients.
β βββ generate_points.py β‘ generate the PTS files.
βββ data β‘ SVG files + PTS files, example fourier.svg.
βββ demos β‘ demo GIFs for repo preview.
βββ example
β βββ bezier.py β‘ making random smooth curves.
β βββ generate_joseph_fourier_portrait.py β‘ generate the PTS file for fourier.svg
How to use:
- To generate an arrow animation
This will generate the arrow animation for the points fed to
python arrow_animation.pyFOUR.animate(points,...)method, check the examples in the script - To generate an arrow animation
This will generate evolution animation for the points fed to
evolution_demo.pyFOUR.evolve(points,...)method, check the examples in the script
I don't own the rights for any of those images.






