Fire simulation

A simple application that uses cellular automaton. Push ‘A’ key to animate. Try to set various options and see differences. Nice to play for a while.

Screenshot of fire simulation

Formula used to calculate next frame:

[code lang="c++"]burn[x][y] - burn level on coordinates x,y
foreach x,y
if burn[x][y] < level_needed_to_catch_fire AND
(right_ratio*burn[x-1][y]+left_ratio*burn[x+1][y]
+top_ratio*burn[x][y+1]+bottom_ratio*burn[x][y-1])/4
> random_value(0...accuracy)
then burn_in_next_frame[x][y] = accuracy
else burn_in_next_frame[x][y] = maximum(0, burn[x][y]-burn_out_ratio
[/code]

News:
2006-05-22 second release, now windows version should work without hassles
2006-05-13 initial release

Downloads:

License: GNU General Public License
Author: Jacek Migda?

Leave a Comment

authimage