Rainbow Worm
✓ Published0🌍 Public
Mmbostock
Last edited Nov 26, 2018
Created on Nov 28, 2012
A rainbow-colored worm undulates across a dark field, its sinusoidal body shifting with a peristaltic motion. The animation renders the worm as a sequence of thick path segments, each filled with a hue from the HSL color space based on its position. The code uses D3 v3 to compute and update the paths, with the `d3.timer` driving the animation. The lineJoin function calculates the stroke outlines to create a continuous, tube-like shape that varies in thickness and color as it moves.
AI-generated descriptionA recreation of an earlier Protovis example, reminiscent of peristalsis.
gpl-3.0 Licensed