This project draws inspiration from the visual spectacle of fireworks displays, aiming to simulate the explosive bursts of color and light seen in real fireworks shows.
Overall Concept:
The artwork aims to simulate the vibrant and dynamic nature of fireworks displays. Each burst of particles represents a fireworks explosion, with colorful particles shooting outwards and leaving behind fading trails. The animation creates a mesmerizing display reminiscent of real fireworks shows.
Special Functions:
- setup(): Initializes the canvas and sets up the environment for drawing.
- draw(): Continuously updates and renders the scene, creating the effect of fireworks bursts.
- createParticles(): Generates new particles to simulate fireworks bursts.
- updateAndDisplayParticles(): Updates and displays the existing particles, including their movement and trails.
- createRandomVector(min, max): Helper function to create a random vector within a given range.
- createRandomColor(): Helper function to generate a random color for the particles.
- createRandomTrailColor(baseColor): Helper function to create a random trail color based on the base color of the particles.
- Particle class: Represents a single particle in the simulation. Includes methods for updating its position, displaying the particle, displaying its trail, and checking if it’s visible within the canvas.
Problems Encountered:
- Ensuring smooth performance while maintaining a large number of particles.
- Balancing the appearance of the particles and their trails to achieve a visually appealing effect without overwhelming the viewer.
- Managing the lifespan of particles and their trails to prevent excessive resource consumption.