Skip to main content
Public

Share visualization

Loading preview…

Changing Colors with Waves

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Changing Colors with Waves

4
CCurran Kelleher
Last edited Oct 9, 2025
Created on Sep 19, 2019
Forked from Hello Canvas

A grid of colored circles animates in a wave-like pattern, shifting between red and blue based on their size. The canvas rendering shows 40 by 30 circles, where each circle’s horizontal position and radius oscillate with sine and cosine functions over time. The code uses the Canvas API’s `getContext('2d')`, `beginPath`, `arc`, and `fill` methods, with `requestAnimationFrame` driving the continuous animation. Colors change dynamically: circles larger than a threshold appear blue, while smaller ones turn red, creating a pulsing, color-shifting visual effect.

AI-generated description

A grid of moving and colored circles.

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

Comments

Sign in to join the discussion.

MIT Licensed