Day 2: Extending simulations
Today you will be introduced to basic programming and scripting concepts. For this to happen, you will interact with a simulation similar to the one introduced on day one. However, this simulation—written in Javascript—is more computationally intricate and allows you to manipulate the input parameters of the model to add elements that would affect the outcome of the simulation.
Beginning elements of programming concepts such as if, then, else, and conditional statements will also be introduced to you.
Topics
-
- Programming concepts
- Statements:
- If
- Else
- Conditional
- Basic programming and scripting concepts
- Javascript
- javascript file (fire.js)
- css file (fire.css)
- index.html
Resources
Simulation
Javascript Forest Fire Simulation (Shown below): This simulation consists of a Javascript file (fire.js) that dictates the simulation, the css file (fire.css) which formats the model, and an index.html file which combines everything together and allows input parameters to be modified and controlled by running, pausing, or resetting the simulation.

Javascript Forest Fire Simulation
Assignment
Use the Javascript Forest Fire Simulation to manipulate the input parameters of the model. For example, change the size of the forest and set probabilities for a tree catching fire and setting the forest ablaze.