Skip to main content
100%

D3 Selection Exploration (1st Stage)

✓ Published1🌍 Public
XXuân Vinh
Last edited Nov 21, 2023
Created on Nov 21, 2023

A row of circles oscillates vertically in a sine-wave pattern, with the number of circles shifting over time. The animation uses D3’s selection and data-join methods, calling `svg.selectAll('circle')` with `.data()` and `.join('circle')` to update, enter, and exit elements smoothly. Each frame, `setInterval` generates new data points from `range(n)` and calculates y-coordinates using trigonometric functions, while the SVG canvas fills the browser window.

AI-generated description

A reproduction of a Sol LeWitt art piece.

MIT Licensed

Similar vizzes