🌍 Public
Viewing a saved revision (read-only)
60c3baed527c4e7a862fc749eb9ec705
D3 Selection
This example demonstrates animated sine-wave motion in an SVG scene using D3. A line generator creates a path from 15 points, with each point’s y-coordinate oscillating based on a sine function of its index and a time variable. Circles are bound to the same data, updating their position each frame via D3’s data join. The code uses `d3.select`, `d3.range`, `d3.line`, `selectAll`, and the `join` method, refreshing every 100 milliseconds. The animation runs indefinitely, shifting the wave pattern across the viewport.
AI-generated description