Assignment 3 – Fireworks

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:

  1. setup(): Initializes the canvas and sets up the environment for drawing.
  2. draw(): Continuously updates and renders the scene, creating the effect of fireworks bursts.
  3. createParticles(): Generates new particles to simulate fireworks bursts.
  4. updateAndDisplayParticles(): Updates and displays the existing particles, including their movement and trails.
  5. createRandomVector(min, max): Helper function to create a random vector within a given range.
  6. createRandomColor(): Helper function to generate a random color for the particles.
  7. createRandomTrailColor(baseColor): Helper function to create a random trail color based on the base color of the particles.
  8. 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.

Leave a Reply