Sine Wave Circles
✓ Published13🌍 Public
A grid of 30 circles animates vertically in a sine wave pattern, with each circle’s vertical position determined by its index and a continuously advancing time parameter. The D3 version of the Math Sine Wave P5.js example uses `d3.range` to create the circles, `d3.timer` to drive the animation loop, and SVG circle elements with `cx`, `cy`, and `r` attributes. The sine function from the JavaScript `Math` library calculates the y-coordinate, while a fixed frequency and viewport height shape the wave’s amplitude and period.
AI-generated descriptionA D3 version of the Math Sine Wave P5.js example.
Ported to ES6 from an older version: bl.ocks.org: Sine Wave Circles with blockbuilder.org.
MIT Licensed