Home Download Help Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish

NetLogo Models Library:

Note: If you download the NetLogo application, every model in the Models Library is included. 
This program models the action of fireworks. Rockets begin at the bottom of the world, shoot upwards into the sky and then explode, emitting showers of falling sparks.
Each rocket, represented by a turtle, is launched upward with an initial x y and z velocity. At a certain point in the sky, an explosion occurs, which is represented by a series of turtle hatches. Each hatched turtle inherits the velocity from the original rocket in addition to velocity from the explosion itself. The result is a simulation of a fireworks display.
SETUP creates FIREWORKS rockets at the bottom of the screen (MINPZCOR). Pressing the GO forever button executes the model continually, launching the rockets. When a rocket hits its peak velocity, it explodes into FRAGMENTS pieces.
GRAVITY determines the gravitational strength in the environment. A larger value will give a greater gravitational acceleration, meaning that particles will be forced to the ground at a faster rate. The inverse is true for smaller values.
INITIALXVEL sets the initial xvelocity of each rocket to a random number between the negative and positive value of the number indicated on the slider.
INITIALYVEL sets the initial yvelocity of each rocket to a random number between the negative and positive value of the number indicated on the slider.
INITIALZVEL sets the initial zvelocity of each rocket to a random number between 0 and the number indicated on the slider plus ten. This is to ensure that there is a range of difference in the initial zvelocities of the fireworks.
FADEAMOUNT determines the rate at which the explosion particles fade after the explosion.
If TRAILS? is true the fragments of each explosion will have their pens down so the paths of each fragment are visible (and they look like real fireworks).
If SPINOBSERVER? is on the Observer will spin around the world as the model runs.
The model will launch a new set of rockets every DELAY seconds.
This model has been constructed so that all changes in the sliders and switches will take effect in the model during execution. So, while the GO button is still down, you can change the values of the sliders and the switch, and you can see these changes in the world.
Experiment with the INITIALXVEL, INITIALYVEL, and INITIALZVEL sliders. Observe that initial x and y velocities of zero launch the rockets straight upwards. When the initial x or y velocities are increased, notice that some rockets make an arc in the sky.
With the initial zvelocity, observe that, on a fixed GRAVITY value, the heights of the fireworks are lower on smaller initial zvelocities and higher on larger ones. Also observe that each rocket explodes at a height equal to or a little less than its apex.
Observe what happens to the model when the GRAVITY slider is set to different values. Watch what happens to the model when GRAVITY is set to zero. Can you explain what happens to the fireworks in the model? Can you explain why this phenomenon occurs? What does this say about the importance of gravity? Now set the GRAVITY slider to its highest value. What is different about the behavior of the fireworks at this setting? What can you conclude about the relationship between gravity and how objects move in space?
The fireworks represented in this model are only of one basic type. A good way of extending this model would be to create other more complex kinds of fireworks. Some could have multiple explosions, multiple colors, or a specific shape engineered into their design.
An important aspect of this model is the fact that each particle from an explosion inherits the properties of the original firework. This informational inheritance allows the model to adequately represent the projectile motion of the firework particles since their initial x, y, and z velocities are relative to their parent firework.
To visually represent the fading property of the firework particles, this model made use of the reporter scalecolor
. As the turtle particles fall to the ground, they hold their pens down and gradually scale their color to black. As mentioned above, the rate of fade can be controlled using the FADEAMOUNT slider.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 2006 Uri Wilensky.
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This is a 3D version of the 2D model Fireworks.
(back to the NetLogo Models Library)