Skip to main content
100%

Sine Wave Circles

✓ Published13🌍 Public
CCurran Kelleher
Last edited Aug 6, 2022
Created on Oct 6, 2021
Forked from HTML Starter

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 description

A 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

Similar vizzes