Fork of Sine Wave Circles
✓ Published1🌍 Public
A sine wave is visualized as a horizontal row of 30 circles whose vertical positions oscillate over time, creating a smooth wave-like motion across the SVG canvas. The code uses D3.js v7 to bind a numeric range to circle elements, computing each circle’s y-coordinate from a sine function of its index plus a time offset from `d3.timer`. The amplitude is scaled to the SVG height, with a fixed radius derived from the width and circle count. This D3 adaptation mirrors the original p5.js example, rendering animated circles without any external data source.
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