Board Games30
Role Playing40
Resource Directory
Code Gallery3
Help & Documents13
IOTD: Fire-algorithm in 3D using PovRay
Fire-algorithm in 3D using PovRay
Fire-algorithm in 3D using PovRay, by kentl

As part of a university course i had to create a picture in PovRay, as i am not the artistic type of human being i thought that i would try to illustrate an algorithm instead.

First i thought about recursive patterns, but finally decided to take the old demo-algorithm Fire and make it in 3D. This is how it works roughly:
  1. for i = 1 to 30
  2. At random put out 200 number of particles in a box of size 20x20 located in the middle of the space, each particle with varying intensity.
  3. For each "particle slot" in space: Let next intensity be: [sum of surrounding 6 `particle slots' intensity and current intensity]/4 if a particle gets a lower intensity than 1 (as it's of type float) let it be 0.0
  4. next i
  5. Draw all "particle slots" on screen, each particle represented as a sphere with color and size depending on it's intensity.
The result is, as you can see quite similar to a sphere itself. I am not 100% satisfied with it, but as the growth is in all directions with equally degrading intensity i think it's hard to get away from the basic shape. The "small explosions" you see on the surface is due to the randomness of step [2].
looks great si-fi face wizzard of oz - piccolo
I have no idea how this is supposed to be fire, but it looks cool. 8-) - 23yrold3yrold
Thanks, it would have looked a bit better if i had chosen different colors (more firery ;)). It looks more like some kind of explosion, or wired thingy. - kentl
I think thas pretty usefull with some tweaking i'm pretty sure I can use it to render explosions, which I have yet to master drawing. :) good job man. - flares
This section is only available to registered members.

The Gallery | Add your own image!
Is grammer and spelling important?
View Results