Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Sine Wave Circles

Public visualization

Fork of Sine Wave Circles

0 stars1🌍 Public
AAndre J Denais
Last edited May 25, 2023
Created on Aug 11, 2022
Forked from Sine Wave Circles

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 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.

Comments

Sign in to join the discussion.

MIT Licensed