Fork of Sine Wave Circles
✓ Published1🌍 Public
This example shows a horizontal row of 30 equally spaced circles whose vertical positions oscillate to form a sine wave pattern. The circles move up and down smoothly, with the wave phase shifting over time. Built with D3 v7, the code uses `d3.range(n)` to generate the circle indices and `d3.timer` to drive the animation loop. Each circle’s y-coordinate is computed from a sine function combining the index, a frequency factor, and the elapsed time, with the SVG canvas fixed at 960 by 500 pixels. The rendering uses standard SVG circle elements.
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