Inspired by 3Blue1Brown - Pure Fourier series animations for 12 oddly satisfying minutes
Example svg from Wikimedia
You may view the result at https://skyzh.github.io/fourier-transform-drawing/
Let f : R -> R^2, f denotes a function from time t to complex plane.
f represents a svg path. Obtain fourier series of f.
On the webpage a blue circle represents one term in the series.
- Install Python, Node.js, etc. Run
yarn start
to start dev server. Replace SVG path inindex.html
. Visit web page athttp://localhost:8080
- Edit
transform_point
function, watch pattern inOriginal SVG
, adjust until the pattern fills the canvas. - Click Dump SVG Data. Note that it may take a long time. View progress in console. Copy
fft_data.json
to analysis folder. - Adjust
freq_range
in analysis.py. Run./analysis.py > dump.json
. - Run
yarn start
again to see the result. You may see pattern like this