Harmonograph
A harmonograph draws a continuously evolving parametric curve on a Canvas element, with four adjustable oscillators controlling the x and y coordinates. Each oscillator has sliders for frequency, damping, amplitude, and phase rate, plus a phase-reset button. The animation loop uses `requestAnimationFrame` to redraw the curve each frame, applying damped sine functions that fade over time. The code uses the Canvas 2D API's `getContext`, `moveTo`, `lineTo`, and `stroke` methods to render the intricate, slowly shifting patterns.
AI-generated descriptionThis is some exploration of harmonographs and part of a series explorations in visualizing parametric equations. Also check out <a href='http://bl.ocks.org/veltman/'>Noah Veltman</a>'s block: <a href='http://bl.ocks.org/veltman/72108247a8f8304ce0ccd7a50f49a9ca'>Harmonographics</a>