Changing Colors with Waves
✓ Published0🌍 Public
Rows of circles ripple horizontally across a 960 by 500 pixel canvas, their horizontal positions perturbed by a sine wave and their sizes pulsing with time. Each circle is drawn using the Canvas `arc` and `fill` methods, with its color switching between red and blue depending on whether its current size exceeds a threshold. The animation runs via `requestAnimationFrame`, advancing a time variable `t` in increments of 0.1 to drive the motion.
AI-generated descriptionA grid of moving and colored circles.
From "Mathematical Patterns" tutorial given at MIT on July 28, 2013.
MIT Licensed