How to program fire...graphics
science_geek
Posts: 247
ok, so this is one of those stupid things that i came up with just to be an idiot towards my friend. what i want to know is, is there any source of reading out their that can give a basic algorithm on how to program fire. i have looked at the example of a flaming cube in "Processing" and think that would be cool. my goal is not to make something that runs fast and is very realistic but to make fancy colors on a display that kind of mimic the dancing of a flame with some basic shape to it. i am hoping to do this in a slow version with the prop and a quick version with my computer, both versions output to a display which im going to put a black piece of paper around to simulate a ring. this way we can have a fire in the middle of winter...(i know kinda stupid, but he started it)
Comments
I remember that the code meant to produce flames was like: generate a line of random colors and the from the bottom up they would move and change colors according to the selected scale. very simple.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Get some graph paper and some colored pencils and go to work.· Once you have a drawing you like then devise a way to make the computer draw the pixels that way.
www.programmersheaven.com/ph/Search/Search.aspx?query=fire&x=0&y=0
this entry has a very simple C code: www.programmersheaven.com/download/16877/download.aspx
Most difficult may be to use a small palette like the one in the VGA driver.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU