What are Fourier Epicycles?

The beautiful intersection of mathematics, physics, and art.

The Mathematical Magic

In 1822, French mathematician Joseph Fourier made a profound discovery: any complex, periodic signal can be broken down into a sum of simple, perfectly uniform sine and cosine waves. This is known as a Fourier Series.

While originally used to solve equations for heat transfer, this concept applies to almost everything in the modern world. When you listen to an MP3, look at a JPEG image, or send a message over Wi-Fi, Fourier transforms are working behind the scenes to break down and reconstruct complex data into simple frequencies.

From Waves to Rotating Circles (Epicycles)

A sine wave is just a 1-dimensional representation of a circle unrolling over time. If we use complex numbers, we can represent these sine waves as rotating vectors (arrows) in 2D space.

An Epicycle is a circle rolling on the circumference of another circle. By attaching the center of a fast-rotating, small circle to the edge of a slower-rotating, large circle, we can trace complex patterns. If we attach enough of these circles together—each rotating at a specific mathematical frequency, amplitude, and starting phase—we can trace any 2D shape in existence.

How Epsilon Harmonics Works

  1. Edge Detection: When you upload an image, we first use computer vision (Canny & Sobel algorithms) to extract a clean, single-line "pen sketch" of your subject.
  2. Path Routing: We use a Travelling Salesman algorithm to figure out the shortest path to draw all the disconnected parts of the sketch in one continuous motion.
  3. The Fast Fourier Transform (FFT): We feed this continuous coordinate path into a discrete Fourier transform. The algorithm analyzes the path and outputs a set of frequencies.
  4. Animation: We take the top 250 most dominant frequencies, convert them into rotating circles, link them end-to-end, and render the animation frame-by-frame. The tip of the final circle traces your exact image!

Why do we see "Jump Lines"?

A Fourier series is a single, continuous equation. It describes a pen that is always touching the paper. If you ask it to draw two disconnected circles (like a pair of glasses), the math physically cannot "lift the pen". It has to draw a line connecting the first circle to the second. To make the final animation look as clean as possible, we use a hidden mask to simulate lifting the pen exactly when the Fourier series is travelling across one of these jumps.

Try it Yourself