Contributions are welcome! Feel free to open a pull request or submit an issue if you find any bugs or have any suggestions for new features.
Fourier Series is a fascinating mathematical concept that can be used to break down signals into their component harmonics, in a variety of complex situations -- in our case 2D drawings. By simulating these systems, we can gain a better understanding of how the calculation for fourier-series works and how order (drawings) emerge from clockwork chaos (precise cycloids).
This project is a simulation of fourier-series approximation of arbritrary 2D drawings, with cycloids that combined with each other, trace out the approximation to a given drawing. In this simulation, one can start off with a low number of harmonics and a simple drawn images (svgs) that are nice and easy to approximate (infinity sign, twitter logo). Then one after the other one may start adding more harmonics and see the approximations get better drawn, reactively. At the end we find that even with an extremely small number of harmonics (50 for example), the approximation are good enough and that the motion of the tip of cycloids (the very last cycloid) is seeming chaotic but exactly, scriplty organised.
fourier.mp4
milestone1-video2.mp4
milestone1-video1.mp4
Here are the instructions to build and run the project:
Note: this project uses cmake
, make sure that is installed, the minimum version for cmake
is specified inside the CMakeLists.txt
cd fourier-series
cmake -DCMAKE_BUILD_TYPE=Release -S . -B ./build/
cd ./build/
make
cd ..
./build/fourier_series
The following registers the interesting bugs and milestones I came over the way.
If you want to further study and understand fourier-series and fourier transform, here are the resources I used:
- But what is a Fourier series? - 3b1b
- 2D Signal approximation ... - Pezzza's Work
- But what is the Fourier Transform? - 3b1b
- The more general uncertainty principle ... - 3b1b
This project is licensed under the Creative Commons License. See the LICENSE
file for more information.