---
title: "Draw Any Wave with Circles Interactive Lab | Sandbox Physics"
description: "How can steady rotations rebuild almost any periodic signal? Each Fourier term is an arrow turning at a fixed rate."
canonical_url: "https://sandboxphysics.com/labs/fourier-epicycles/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/fourier-epicycles/"
last_modified: "2026-10-27"
---

Fourier series · rotating vectors

# Fourier Epicycles

**How can steady rotations rebuild almost any periodic signal?** Each Fourier term is an arrow turning at a fixed rate. Large slow arrows draw the broad shape, and small fast ones add the sharp details. Chain enough of them tip to tail and the last tip traces nearly any periodic signal.

Each Fourier term is a rotating vector. Connect them head to tail and the final tip traces a curve; add more terms and a wobbly approximation locks onto the target wave.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Large, slow circles carry the broad shape; small, fast circles fill in sharp corners. That is the heart of a spectrum: any periodic signal is a stack of pure rotations, and the coefficients say how much each frequency contributes.

Physics tutorial

## Fourier series: decompose shape into frequency

**Background** Under broad conditions, a periodic signal can be represented as a sum of sines and cosines at integer multiples of a base frequency. Epicycles show the same decomposition in the complex plane.

**Why it matters** A spectrum turns sound, images, vibration, and communication from shape problems into questions about how much of each frequency is present.

Start with the essentials

- **Focus question**: How can vectors moving only in uniform circles draw a square wave with sharp corners?
- **One-sentence intuition**: Large slow components carry the broad shape; small fast components supply edge detail.

### Core mathematical model

#### Fourier series

$$
f(t)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left[a_n\cos(n\omega_0t)+b_n\sin(n\omega_0t)\right]
$$

Each $n$ is an independent harmonic whose coefficients set magnitude and phase.

#### Odd harmonics of a square wave

$$
f_N(t)=\frac{4}{\pi}\sum_{n=1,3,5}^{N}\frac{\sin(n\omega_0t)}{n}
$$

A square wave uses odd harmonics with amplitudes falling as $1/n$.

### Common difficulties

#### More terms do not remove all overshoot

**Typical misconception** A sufficiently large N makes convergence smooth everywhere.

**Better mental model** Gibbs overshoot becomes narrower near a jump, but its relative height does not shrink to zero.

#### Frequency and circle size are separate

**Typical misconception** A faster circle must also be larger.

**Better mental model** Harmonic number sets rotation rate; the Fourier coefficient sets radius.

### Run the experiment

1. 01

   #### Keep only the fundamental

   Choose Square and set N to 1.

   **What to observe:** The output is only a smooth sine wave.

2. 02

   #### Add high frequencies

   Increase N slowly.

   **What to observe:** Flat tops and steep edges emerge as small circles add detail.

3. 03

   #### Compare coefficient decay

   Switch among square, sawtooth, and triangle waves.

   **What to observe:** Smoother waveforms lose high-frequency content faster.

Physical conclusion

Fourier analysis sorts a complicated change by frequency; the circles are only one way to draw it.

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
