0

I made a program with python which displays an animation of the propagation of a fire spreading in a forest in 2D (the forest is an array):

  • no tree = 0.0
  • a tree = 1.0
  • a tree in fire = 2.0

Here is an example (without wind and relief):

enter image description here

And I also made a surface plot with mayavi, python and gdal using this post (DEM plot with matplotlib is too slow).

Now I want to know how to put the propagation that I made with an array (in 2D) over the surface of the mountain as if it was a kind of layer that will be able to move and grow on the surface like a fire growing in a forest.

I am not asking for an algorithm that can make a simulation of a forest fire.

I am asking for a way to create this kind of layer over the surface plot I made.

For instance, in the next photo you can see a red layer (the spreading fire) on the surface:

enter image description here

Source: https://www.researchgate.net/figure/48202796_fig11_Fig-11-The-finest-domain-in-the-Meadow-Creek-fire-simulation-5-h-after-ignition

3

Sorry, but for me it is not a GIS problem but a pure Python problem:

  1. You need to learn Mayavi: mlab: Python scripting for 3D plotting before using it.
  2. Mayavi, as Matplotlib, knows nothing about georeferenced surfaces. You can plot easily a DEM surface, but if you want to drape a raster over the DEM or plot lines, it is a problem of Mayavi.
  3. The only example I know is 3D terrain visualization with python and Mayavi2

Generally, I use GRASS GIS for that with also ParaView witch also use VTK

enter image description here

enter image description here

  • I also found this example but this is an image not an array and it does not say how to cover the DEM with my animation of a forest fire. I will look at your first link and learn everything I can but I do not think I will be able to do this on my own. I hope that someone else knows these kind of things. Thank you for your help :) – Loïc Poncin Jan 4 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.