Elementary Cellular Automata in HTML5 Canvas (what is this?)

  1. Range: 0–255 — try 30 57 60 89 90 110 126 169 184; see here & here.
  2. Width × height.
    ×
  3. Increase (e.g. to 50, 100, 500...) for speedup when drawing large canvases.
      rows
  4. Usually a centred singleton; some rules better with random, e.g. 184.
  5. If yes, canvas behaves as a cylinder; if no, it's a rectangle.

This is an implementation by Andy Gimblett of Elementary Cellular Automata using the HTML5 canvas. I did this as an exercise in learning canvas and to remind myself how Javascript works. :-)

The code is fairly concise and reasonably jslint-clean, depending on the options used: ElementaryCA.js, CACanvas.js, ca.js.

Todo: form validation; save last parameters used, using HTML5 local storage; improve "save as png" handling.