Fourier Drawing — Epicycles

Two chains of rotating arms — one for x(t), one for y(t) — draw a knight, a bat, a heart, a star and more, live. Slide N from 1 to 50 harmonics per axis and watch detail arrive, with the mean error printed as it falls.

Example — Draw the knight with N = 1, then N = 50N = 1: an ellipse-like blob, mean error 6.21% of height · N = 50: error 0.04%

Teal chain sets x(t), gold chain sets y(t); the pen sits where their guides cross. Mean distance between pen and outline at N = 20: 0.15% of the shape's height. At N = 1 both coordinates are pure sinusoids, so the pen can only draw an ellipse-like blob — detail arrives with the higher harmonics.

How we got it — the example, step by step

  1. Each outline is sampled at 256 points. Each coordinate gets its own real Fourier series: x(t) = a₀ + Σ aₖcos(kt) + bₖsin(kt), and the same for y(t) with its own coefficients.
  2. A cosine and a sine of frequency k make one arm of length √(aₖ² + bₖ²) turning k times per lap; on screen each harmonic is drawn as two counter-rotating arms so every circle is a true term of the series.
  3. The teal chain adds up to x(t), the gold chain to y(t), and the pen sits where their dashed guides cross.

Check it backwards

The error is the mean distance between the pen and the true outline over the 256 sample points, as a percentage of the shape's height — computed from the same coefficients that drive the animation. The circle needs no faith at all: at N = 1 its error is already 0.00%.

Questions people also ask

Why two chains instead of one?
Because x and y are separate functions of time, each with its own series. The crossing of the two guides is the point (x(t), y(t)) — pin the pen to both chains and the outline draws itself.

Where do the knight and bat outlines come from?
They are the same outlines used in the Fourier epicycle videos this page is modelled on — sampled, coefficient-ed and drawn by the identical mathematics, here running live in your browser instead of in a video.

Can I draw my own outline?
Not yet — the shapes are presets whose sampled points ship with the page. The coefficients are recomputed in your browser from those points, so the maths is identical for every shape.

Related calculators

Every answer on this page is computed, not typed from memory — the check under each result runs the calculation backwards. Figures are rounded only where the page says so. Last updated: October 13, 2026 · Clirto — every answer free, every step shown.

Made to stay free — built for students, teachers and everyone, not for a paywall »

◆ Clirto=✦ Plain-English Questions+✓ Step-by-Step Working+∞ Free Forever→▥ Instant Answers