Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Illusion of rain

Public visualization

Viewing a saved revision (read-only)

71ad20fd1f8e4bf6b330d1b3c6232575

Illusion of rain

0 stars0🌍 Public
Nnaisargidave
Last edited Sep 30, 2020
Created on Sep 30, 2020

A grid of small circles falls steadily down the canvas like rain, while a separate set of static grey circles and one gold circle sit in the upper region as a backdrop. The rain effect is animated with a Canvas 2D context, using `requestAnimationFrame` and `Math.sin` to oscillate each dot’s horizontal position and size. The drop size toggles between blue and light blue fills based on a sine threshold. The SVG defines the fixed circles, and the JavaScript loop redraws the moving grid each frame.

AI-generated description

Creating an illusion of rain!

From "MathPatterns, changingColors" tutorial given at MIT on July 28, 2013.