Fourier Series Explorer
What is the Fourier Series?
The Fourier Series is a powerful mathematical concept asserting that any repeating (periodic) signal can be perfectly reconstructed by adding up a series of simple sine waves. Each sine wave in the sum has a specific frequency, amplitude (strength), and phase (starting offset). This simulation brings this abstract idea to life. Think of it like a recipe: the final waveform is the dish, and the individual sine waves are the ingredients, each with a specific amount (amplitude) and type (frequency).
How to Use This Simulation
- Presets: Choose from a variety of signals to see their Fourier "recipe."
- Classic Waveforms: Square, Sawtooth, and Triangle waves show how sharp, geometric shapes are built from smooth sine waves.
- Musical Phenomena: Beats visualizes the interference of two close frequencies, while Three-Tone Chord builds a simple musical chord.
- Complex Signals: Complex Tone and 2Hz + 3Hz demonstrate how richer timbres are formed.
- Drawing Speed Slider: This slider directly controls the passage of time in the simulation. Drag it slowly to see exactly how the rotating vectors in the epicycle view build the final shape in the time domain view.
- Auto Demo: Sit back and watch a tour of all the presets. This mode automatically cycles through each waveform, animating its construction from start to finish.
- Audio Toggle: Hear the signal you're seeing! Each frequency component is mapped to an audible pitch, and its amplitude determines the volume. This directly connects the mathematical visualization to the sound we perceive.
Understanding the Three Visualizations
The simulation is split into three interconnected panes, each offering a different perspective on the same process.
- Time Domain (Top/Large Pane): This is the most familiar view. It plots the signal's final amplitude (vertical axis) against time (horizontal axis). The white dot shows the signal's value at the exact moment being calculated by the epicycles.
- Epicycles (Bottom-Left/Middle Pane): This is the heart of the simulation, showing the Fourier series in action.
- Each rotating arrow is a phasor, representing one frequency component.
- Its length is the component's amplitude.
- Its speed of rotation is its frequency.
- The phasors are chained head-to-tail, starting from the "Center of Mass". The tip of the final phasor traces the waveform.
- Frequency Domain (Bottom-Right/Middle Pane): This pane shows the signal's "recipe" or spectrum. The horizontal axis is frequency, and the vertical axis is amplitude. Each bar shows a single sine wave component; the taller the bar, the more that frequency contributes to the final signal.
The Connection: How It All Works Together
The three panes are not separate tools; they are a unified system. The Frequency Domain provides the static list of ingredients. The Epicycles pane takes those ingredients and brings them to life, summing them dynamically as rotating vectors. The vertical position of the final point in the epicycle chain, when plotted over time, creates the exact graph seen in the Time Domain.
Real-World Applications
The principles visualized here are not just a mathematical curiosity; they are fundamental to many fields of science and engineering, especially in biomedical applications.
- Analyzing Brain and Heart Signals: Medical signals like Electroencephalograms (EEG) from the brain and Electrocardiograms (ECG) from the heart are complex, periodic waveforms. By applying Fourier analysis, doctors and researchers can break these signals down into their core frequency components. This allows them to identify specific brain wave patterns (like alpha waves for relaxation or delta waves for deep sleep) or detect abnormalities in heart rhythms that might not be obvious from the raw time-domain signal alone.
- The Science of Hearing: Your own ears perform a biological version of Fourier analysis! The cochlea in your inner ear is structured to resonate at different locations for different sound frequencies. When a complex sound enters your ear, it's deconstructed into its component frequencies along the cochlea, which then sends this spectral information to the brain. This is how we perceive pitch and timbre, and it's why the "Audio" feature in this simulation provides such a direct link between the visual components and the sound they create.
Future Directions
This tool is an ongoing project. Future updates may include:
- The ability to draw your own custom waveform and see the simulation compute its Fourier series.
- More advanced controls for phase, amplitude, and frequency.
- Deeper educational content and mathematical derivations.