Fireworks Display

fireworks

Coding is an Art


Let’s first whatch this video clip which shows how a computer program can be used to create a large scale, live and interactive fireworks display:
Watch video clip

Fireworks Code


Inspired by this application of computer science, we have decide to create our own firework display using a Python script.

For this challenge we are using the processing library which is used to draw on the screen and to refresh the screen based on a frame rate. This is what we need to create our fireworks animation, based on a 24 frames per second.

Your task:


Analyse the code above. Change some of the parameters to see the impact on the aimation. Customise your fireworks further based on your preferences.

Interactive Fireworks


Let’s make an interactive fireworks display that responds to the user typing on the keyboard.
To test this script make sure you click on the fireworks display first (while it’s running). Then you will be able to interact with it by pressing any key on the keyboard:

Share Button
Posted in Computer Science, Python - Advanced, Python Challenges Tagged with: , ,

Our Latest Book