Skip to main content
100%

Fireworks on Canvas

✓ Published0🌍 Public
Bbootshine2
Last edited Sep 26, 2019
Created on Sep 26, 2019

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 description

Revision 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.

MIT Licensed

Similar vizzes