firesim is an interactive web-based simulation that models the spread of fire through a forest under various conditions. Users can adjust parameters such as wind direction, rain level, and tree density to see how these factors influence the spread of fire. The simulation provides a visual representation of a grid of cells, each representing a portion of the forest that can be in one of several states: empty, tree, burning, or burned.
- Dynamic Grid: The simulation grid represents the forest, with each cell capable of being a tree, burning, or burned.
- Wind Direction: Users can set the wind direction (North, South, East, West), which affects the spread of fire.
- Rain Level: The simulation allows for rain levels to be set to None, Medium, or High, which affects the probability of fire spreading.
- Tree Density: Users can adjust the density of trees within the forest, affecting how easily the fire can spread.
- Interactive Controls: Start, stop, and reset the simulation at any time. Users can also toggle rain on and off.
- Probability Settings: Set the probability of fire spreading in the main and opposite wind directions. The simulation calculates orthogonal and diagonal spreading probabilities based on these settings.
- Set Parameters: Before starting the simulation, adjust the wind direction, rain level, tree density, and fire spreading probabilities as desired.
- Start Simulation: Click the "Start Simulation" button to see how fire spreads through the forest with the current settings.
- Adjust Conditions: Change the conditions (wind, rain, density) while the simulation is running to see how they affect the fire's behavior.
- Reset: Use the "Reset Grid" button to clear the grid and start a new simulation.
firesim offers an engaging way to understand the dynamics of forest fires and the impact of various environmental factors on their spread. It serves as an educational tool to demonstrate the complexity of fire behavior in natural settings.
