I created this firework simulator using particles. Clicking on the mouse launches the rocket and it explodes after it reaches certain altitude. Every rocket is slightly different. It creates two types of particles upon explosion. The ratio of both particles varies slightly upon explosion. Inheritance and polymorphism has been used to create this effect. I worked upon Dan Shiffman's shattering example.