Skip to main content
100%

Changing Colors with Waves

✓ Published0🌍 Public
Aaishwarya8615
Last edited Sep 24, 2019
Created on Sep 24, 2019

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 description

A grid of moving and colored circles.

From "Mathematical Patterns" tutorial given at MIT on July 28, 2013.

MIT Licensed

Similar vizzes