AI Model Reviewer

Fourier epicycles

Build a Fourier epicycles visualizer that shows how the discrete Fourier transform rebuilds a drawing from rotating circles.

More

1 test · 1 finished runs (1 agent, 0 raw one-shot) · 1 live demo

The prompt

Build a Fourier epicycles visualizer that shows how the discrete Fourier transform rebuilds a drawing from rotating circles. Start from a closed path (presets: a heart, a treble clef, a five-pointed star, a cat silhouette and the outline of a guitar, each defined as point lists in code), resample it to 256 evenly spaced points, compute the DFT yourself in JavaScript, and draw the epicycles: a chain of circles sorted from largest to smallest, each rotating at its frequency, with the tip tracing the reconstructed path as a glowing trail that fades over time. Show the original path faintly underneath so viewers can compare. A slider sets how many terms are used (1 to 256), and the reconstruction updates live so people can watch the shape sharpen as terms are added; a small bar chart shows the magnitude spectrum with the active terms highlighted. Let the user draw their own closed shape with the mouse or a finger and then watch it transformed. Controls: preset picker, term slider, speed slider, play, pause, show or hide circles, clear and draw. So the page is alive without input, on load it plays the heart while slowly sweeping the term count from 1 up to 128, then moves to the next preset after one full drawing, forever, until the user touches a control. Make it mesmerizing, dark background, crisp thin lines and luminous trails. Save it as index.html in the current directory: one self-contained file with inline CSS and JavaScript only, no libraries or frameworks, and no external requests of any kind (no CDNs, web fonts, images or audio files). It must work when opened directly from disk, fit any window from a 390 px wide phone to a desktop, and run without console errors. You may serve it locally and open it in headless chromium (/usr/bin/chromium, software WebGL, no GPU) to screenshot and inspect your own output, and iterate on your own before finishing. Close any browser you open as soon as you've taken your screenshot.

Same prompt, all models: step through 1 runsIn the gallery: one player, arrow keys or swipe.

1 of 1 runs shown