“Coding Druid” series is my horizontal programming practice notes, each part around a topic like mathematical, physics, electronic, graphics, sound, etc., implemented in several programming languages.
Chapter: Fourier Series
This chapter I implement Fourier Series curve visualization.
And Unity this section.
When it comes to Fourier transform or Fourier analysis, it is usually divided into two parts: Fourier series and Continuous Fourier transform. This chapter focuses on the Fourier series.
In mathematics, a Fourier series is a periodic function composed of harmonically related sinusoids, combined by a weighted summation.
For example, suppose there is a square wave, and it can be interpreted into sine waves.
The more sine waves you have, the preciser square wave you will get:
More graphic explanations and formula derivation, see the previous section: Fourier Series Visualization Using React Hooks .
The effect of the previous section:
Now let’s try Unity.
Have written an note Sine function visualization using Unity3D. So on the basis of its code, the drawing formula can be modified from the trigonometric function to the lower Fourier series：
The full code can be seen later.
- Sine function visualization using Unity3D
- Fourier Series Visualization Using React Hooks
- Building a Graph Visualizing Math
Talk is cheap. Show me the code!
This demo and the Coding Druid series is open source here:
You may buy me a coffee in my Patreon. There are many articles, patches, source code and some advanced Patron-only content there.
Also you can get some free patches/codes in Gumroad shop.
Your encouragement is my driving energy!