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
    ./BMPautomata
    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.

Post Comment

Name:
Comment:  
Security Code: Verification Code Five Digits