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.py
FOUR.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.py
FOUR.evolve(points,...)
method, check the examples in the script
I don't own the rights for any of those images.