Fireworks on Canvas
This visualization displays a dynamic field of colorful dots that radiate outward and pulse in a circular pattern, evoking the effect of a fireworks display against a fading black backdrop. The animation is driven by a generative mathematical formula based on a grid of parameters, where each dot’s position is calculated from trigonometric functions of time, and its hue shifts through a rainbow spectrum. The code utilizes the Canvas `getContext('2d')` API for all drawing, with `fillStyle`, `fillRect`, and `arc` methods to render the fading trails and circles, and `requestAnimationFrame` for the continuous animation loop.
AI-generated descriptionRevision of the "modern day screensaver." added random jitter and moved the center so that it looks like fireworks.
From "Mathematical Patterns" tutorial given at MIT on July 28, 2013.