April 11, 2009
Cellular Automata BMP utility
by Marco Vitanza
Yet another cellular automata utility -- this time it's a cross-platform C file: BMPautomata.c. Here's how to run it in OS X and get a nifty image like the background here: http://twitter.com/vitanza.
  1. Download the file to your desktop.
  2. Open up Terminal (ahh scary!). It should be in Applications/Utilities.
  3. Type
    cd Desktop
    and press enter.
  4. Type
    gcc BMPautomata.c -o BMPautomata
    and press enter. You should not get any warnings or errors.
  5. You're ready to run it. Type
    and press enter. You should see the usage line.
  6. Now let's run it for real. Type
    ./BMPautomata 90 800 400 > test.bmp
    and press enter. This says to run rule 90 and output a 800x400 image.
  7. Take a peek on your desktop. There should be a shiny new file named test.bmp. Go on, open it. As you can see, the default colors are black/white.
A few notes: The -r flag is optional and acts to turn on random initial conditions. The foreground and background colors are optional and can be specified as 6-char hex colors: RRGGBB.
Comment by Shauni on October 17, 2012 at 10:18am
Which part?Cellular amotuata is a big topic.Visualizations of amotuata is a big topic.Applying cellular amotuata models to voting is a big topic.Cellular amotuata is a computational construct. There are many great resources online explaining the basics of amotuata. In short though, consider a piece of graph paper. You can color in the squares of the graph paper based on simple rules. These simple rules usually involve only looking at the neighboring cells of the cell you are going to color in or not. e.g. if all the neighboring cells are black, color the cell black. You typically apply these rules instantaneously to all cells at a given tick of the clock. You can get a huge variety of global (the entire piece of graph paper) patterns based solely on applying these neighboring cell rules.As silly and simplistic as it seems, these amotuata models can accurately model a huge number of real world and complicated phenomenon such as ant colony behavior, formation of galaxies, voting behavior, evacuation of a building in a fire, etc. etc. The advantage to amotuata as a modeling technique is that there is not complicated math (lots of differential equations and such). You simply define cell states and some simple rules. (of course, you can get more complicated).What's even cooler is that certain elementary amotuata can be used to compute anything (a universal computer!). Just like your laptop only uses a chip composed of logic gates that are either 1 or 0 (on or off) and interprets your photoshopping or web browsing. Essentially this is what computers are big pieces of graph paper where the patterns of colored in cells represent different outputs (you see them on the screen, the chip gets 0s and 1s and the memory stores the patterns )Automata can be seen in nature too. As a simple example, which isn't entirely accurate, you can think of DNA and genetic expression in amotuata terms. 4bases and their pairings form the instructions (computations) for organisms . Really though you can see amotuata in simpler ways in nature like in the formation of certain mollusk shells.keep asking questions, helps me a lot!

Post Comment

Security Code: Verification Code Five Digits