A fire algorithm in Ruby Processing
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.textile
fire.rb

README.textile

Fire in Ruby Processing

This code draws fire with a simple algorithm in Ruby Processing

Here’s a video: Fire video

Algorithm:

1. Create an indexed palette of red, orange and yellows

2. Loop over the following:

  • Draw a random set of colours from the palette at the bottom of the screen
  • Loop through each pixel and average the colour index value around it
  • Reduce the average by a fire intensity factor