your waves.
the math +
Your drawing becomes a sequence of points, written as z = x + iy. A discrete Fourier transform finds their rotating components. Each coefficient cₖ sets a circle’s radius and starting angle; k sets its direction and revolutions per loop. The transform measures each frequency by rotating the sampled points backward at that frequency and averaging them. What survives is cₖ. We add the largest components first; wave order and frequency are different.
The drawing is sampled at 256 evenly spaced positions around a closed path. If your stroke is open, the dashed seam joins its ends. The reconstruction repeats that complete loop. Positive frequencies turn counterclockwise; negative frequencies turn clockwise. The live angle is unwrapped, so it can exceed 360°. Radius and coordinates use the normalized drawing’s units. Error is RMS distance at the sampled points divided by their RMS distance from the center.