An animated introduction to Fourier series
andreinc.net
andreinc.net
Eventually it clicked when considering the Discrete Fourier transform [3], which is just an orthogonal matrix you multiply onto a vector. All the stuff about the inverse FFT, Plancherel theorem and Parseval's theorem come for free: they just say that the matrix is orthonormal.
Maybe this only works if you've already invested in understanding linear algebra. But once I had this discrete understanding, back porting it to the continuous Fourier transform was easy enough.
Maybe I'm weird, but this was a case where just looking at the equations was much easier than all the animations of circles and stuff.
[1] https://www.youtube.com/watch?v=spUNpyF58BY
[2] https://betterexplained.com/articles/an-interactive-guide-to...
[3] https://en.wikipedia.org/wiki/Discrete_Fourier_transform
But I agree, I've done enough integrals for a lifetime!
[1] https://longnow.org/essays/richard-feynman-connection-machin...
As a computer scientist I never actually had a calculus class where we used fourier series.
I just ran into them often enough, through stuff like the fast fourier transform for computing convolutions, that I thought I should understand it better.
So I googled the topic, and stuff like 3b1b is what came up, and what everyone said were the most intuitive explanations.
I eventually did a course on binary functional analysis, and it thought the discrete boolean fourier transform.
"sinusoids are a basis for (a class of functions)"
Everything else basically follows from that. The Fourier transform itself integrates (in one notation) e^{-ikx} against f(x). Well, the integral is a giant dot product, e^{-ikx} is the "transpose" of e^{ikx}, one of the basis vectors, so this amounts to saying f_i = <e_i, f> for a basis element e.
Visualizing them with nested circles flying around and drawing pictures, definitely makes them seem more weird.
Nobody has anything more to say about Fourier series than what Walter Rudin figured out long ago. They can be defined for any locally compact abelian group. They are just trying to teach themselves about what is established theory.
Feel free to cite a textbook on Fourier analysis proving a result not contained in Rudin's text. Uhh.. here's your break. Put up, or shut up.
Of course there are people who would say that this isn't Fourier analysis anymore but the same ideas are still at play.
It's unfortunate, and I wish just watching such beautiful visuals would magically instill the idea in my brain, but it just feels like intellectual dopamine for me.
I don't think it's that as much as...
> I still do all the proofs for math subjects in order to know I can derive them.
You have to do something, apply the knowledge. That's the piece that learning solely from nice visuals misses.
It just so happens that actually solving problems often involves using equations. But I don't think that the essential ingredient.
It probably happens most frequently in math. And people usually first realize it when they're sitting in the exam room and have to actually apply what they think looked so easy on YouTube. I may or may not speak from personal experience
I find beauty in the fact that a bunch of circles are spinning on a stick (axis) with increasing frequencies, and if sum up their "tracks", you end up approximating shapes.
It's the signals & systems version of "monoid in the category of endofunctors"
https://www.andreinc.net/2024/04/24/assets/js/2024-04-24-fro...
Looks like it is using processing to do the animation.
It's not something I am particularly proud of, as I was learning p5.js while writing the article, so I've started doing things in a very inefficient way.
When I have some spare time, I will update the article accordingly to include the correct links.
https://webiphany.com/2024-04-29-distance-sean-shawn
I used Svelte and basically pure HTML.
This post has the entirety of the post as a download if you scroll to the bottom and click the view source link. You can download a Svekyll blog that can be compiled with "npm run build" so you can hack the code yourself.
I think Svelte is an incredible tool for building these kinds of animations. I would be very curious to see how/if you would compare processing and Svelte, Andre?
Very good read though, thanks for that. Was reading it while spending the sunset under a tree in a hammock.
If you are interested in this topic you might also like my visualization of a fractional fourier transform [1] and the complex plane [2]
For the people out there who enjoys working in explainers ... maybe consider covering the Laplace transform too? [1] I used to know how to use it to analyze electronic circuits, but I kinda forgot all about it by now (oops :-p) so this is my lazy ask :-).
--
From https://news.ycombinator.com/item?id=25190770#25194040 :
> Convolution is in fact multiplication in Fourier space (this is the convolution theorem [1]) which says that Fourier transforms convert convolutions to products. 1. https://en.wikipedia.org/wiki/Convolution_theorem :
>> In mathematics, the convolution theorem states that under suitable conditions the Fourier transform of a convolution of two functions (or signals) is the pointwise product of their Fourier transforms. More generally, convolution in one domain (e.g., time domain) equals point-wise multiplication in the other domain (e.g., frequency domain). Other versions of the convolution theorem are applicable to various Fourier-related transforms.
"QFT and iQFT; Inverted Quantum Fourier Transform" https://en.wikipedia.org/wiki/Quantum_Fourier_transform
A thing I've noticed is that on some phones is very choppy (the code behind the animation is not the greatest), but I don't understand why it would refresh your browser. What phone / browser are you using, out of curiosity ?
https://edstem.org/us/courses/47529/lessons/80063/slides/440...
Here's another helpful website dedicated to Fourier series and Fourier Transform with videos and books:
(too bad my CPUs goes sky rocket, so every time we open that page we contribute to heating up the planet :)
Unfortunately I didn't know how to optimise the animations better, and once I found out, 90% of the code was already written.
You can right click the image and "Open image in a new tab" for a freeze frame, then checking the values it seems they are switched.
There is also this wonderful primer on signal processing for people who love visualizations.
[1] https://github.com/3b1b/manim
[2] https://github.com/JazonJiao/Manim.js/
[3] https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/...
How are the animations made? Are they gifs or svgs or canvas + js, something else?
The source code can be found here: https://github.com/nomemory/andreinc-site/tree/main/assets/j... , but I am not satisfied with it. I was learning p5.js while writing the article.
I love it when someone too close to the tree loses sight of the forest this way. "rarely see angles in degrees" is so wild of a comment for anyone outside of math. How does one find their location on a map in long/lat in degrees or radians? Do we say degrees on a compass or how many radians? How many radians is that star in right ascension? Did that skater just land a 4*pi jump or a 720?
People living in the worlds of maths forget the rest of the world is not a place of absolutes. There are so many way of looking at things and labeling things. Yet, maths people look at normies like they're stupid for not seeing it their way and make argumentative statements like degrees are useless and anyone using them are silly.