← Step 8 — the exponential \(e^{st}\)  ·  Visualization Hub

The Harmonic Stack — draw anything, and watch \(e^{st}\) redraw it

The same claim as Step 8, now aimed at a picture instead of a signal
$$x(t)=\sum_k r^x_k\cos(k\omega t-\varphi^x_k) \qquad y(t)=\sum_k r^y_k\cos(k\omega t-\varphi^y_k)$$
two ordinary signals — the drawing is just the pair of them plotted against each other

A drawing is two signals wearing a costume

Step 8 ended on a claim: any signal a linear system can produce is a sum of \(e^{st}\) terms, and a periodic one needs only the terms sitting on the \(j\omega\) axis. That is a statement about signals. This page points it at something that does not look like a signal at all — a picture.

Trace a closed curve with your finger and record where the fingertip is over time. You now have two numbers per instant: a horizontal position and a vertical position. Neither is a picture. Each is an ordinary periodic signal, because the curve closes and you can go round again. So each one submits to the same decomposition, independently:

$$x(t)=a^x_0+\sum_{k\ge1}\Big(a^x_k\cos k\omega t+b^x_k\sin k\omega t\Big),\qquad y(t)=a^y_0+\sum_{k\ge1}\Big(a^y_k\cos k\omega t+b^y_k\sin k\omega t\Big)$$ Two separate Fourier series. Nothing links them except that they were sampled at the same instants. The picture is what you get when you plot one against the other.

Why each term becomes a circle

A single term \(a_k\cos k\omega t + b_k\sin k\omega t\) is more readable in amplitude-and-phase form:

$$a_k\cos k\omega t+b_k\sin k\omega t \;=\; r_k\cos(k\omega t-\varphi_k), \qquad r_k=\sqrt{a_k^2+b_k^2},\quad \varphi_k=\operatorname{atan2}(b_k,a_k)$$ That is an arrow of fixed length \(r_k\) turning at a steady \(k\omega\), and the term is the arrow's shadow. Fixed length, steady rate: a circle. Chain the arrows tip to tail and the last tip's shadow is the whole series.

So the two chains below are not decoration. The upper chain's arrows are the terms of \(x(t)\), and the tip's horizontal position is the sum. The left chain's arrows are the terms of \(y(t)\), rotated a quarter turn so that its tip's vertical position is that sum. Drop a plumb line from one and a level line from the other, and where they cross is the pen.

What actually runs when you let go of the mouse

  1. Resample. Your pointer path is redistributed to 256 points spaced evenly along the curve, and the loop is closed. Even spacing matters: a pointer that pauses in one corner would otherwise dump a hundred samples there, and the series would spend its budget describing the pause.
  2. Split. The 256 points become two arrays, \(x[n]\) and \(y[n]\). Both are plotted at the bottom of the canvas — that is the "x-graph and y-graph" the whole trick rests on.
  3. Transform. A radix-2 FFT on each array. Bin \(k\) gives \(a_k = 2\operatorname{Re}(X_k)/N\) and \(b_k = -2\operatorname{Im}(X_k)/N\).
  4. Draw. Every bin becomes one arrow. The \(K\) slider decides how many you keep.
The honest number. The readout shows the RMS distance in pixels between the \(K\)-term reconstruction and the points you actually drew. At full \(K\) it is zero to machine precision — the series is not an approximation of the sampled path, it is the sampled path in another basis.

Two things worth doing on purpose

Where this rejoins the course. Every arrow here turns at a constant rate and never grows or shrinks — pure \(e^{j\omega t}\), exponents pinned to the imaginary axis. Give an arrow a \(\sigma\) and it spirals instead, which is Step 8's panel 1 and the reason a robot's transient dies out (or does not). Step 9 lets the exponents leave the axis entirely and replaces this sum with an integral.

Shape

heart
star
square
Draw your own

Trace over a picture

Load a reference image

The picture is drawn faintly inside the trace box so you have something to follow. It is read straight from your disk into this page — it is not uploaded anywhere, and nothing about it is sent over the network. It is a guide only: the transform sees your stroke, never the image.

A stroke traced over a picture keeps its position — it is not re-centred or stretched to fill the box, so the curve the arrows redraw lands back on the picture you traced it from. If the chains would run off the canvas, picture and curve are pulled in together and stay lined up.

Fourier coefficients

\(k\)\(r_x\)\(\varphi_x\) \(r_y\)\(\varphi_y\)

Harmonics kept

40
0.30×

How close is it

80 arrows
0.00 px RMS from your path
256 samples

Display

Animate
Circles
Original path
Biggest first

Read the canvas

top band — the x-chain. Its tip's horizontal position is \(x(t)\).
left gutter — the y-chain, rotated a quarter turn. Its tip's vertical position is \(y(t)\).
green — the pen, and the curve it has drawn so far this lap.
bottom strips — the two coordinate signals: faint is what you drew, solid is the \(K\)-term series.
coefficient list — \(r\) is an arrow's length in pixels, \(\varphi\) where it starts. Those five columns are the entire description of the picture.