<div> </div>
<div>Some of you old timers may recall a project in May, 2004 to implement</div>
<div>Wolfram's minimalist cellular automaton experiments using a Tk canvas</div>
<div>and/or PIL. </div>
<div> </div>
<div>As I recall, John showed us how to speed it up a whole lot by passing </div>
<div>some 'False' parameter in the GraphWin call. </div>
<div> </div>
<div>However, now that I'm testing the code, in preparation for this post, lo </div>
<div>these many years later (on a faster computer in a different version of </div>
<div>Python (2.5)), and with a newly downloaded graphics.py, I'm seeing </div>
<div>those rows of the Mayan Pyramid, associated with Wolfram's "Rule 30" [1], </div>
<div>run across the screen like some raster beam on an ultra slow TV.</div>
<div> </div>
<div><a href="http://mail.python.org/pipermail/edu-sig/2004-May/003866.html">http://mail.python.org/pipermail/edu-sig/2004-May/003866.html</a></div>
<div> </div>
<div>In any case, the code isn't all the beautiful, could be streamlined, but </div>
<div>consists of nks.py atop two possible Canvas objects, one in Tk, one </div>
<div>in PIL (Python's Imaging Library -- could be a jpeg).</div>
<div> </div>
<div><a href="http://www.4dsolutions.net/ocn/python/nks.py">http://www.4dsolutions.net/ocn/python/nks.py</a> <-- Wolfram's rules 0-255 (computed)</div>
<div>
<div><a href="http://www.4dsolutions.net/ocn/python/canvas1.py">http://www.4dsolutions.net/ocn/python/canvas1.py</a> <- PIL canvas</div>
<div>
<div><a href="http://www.4dsolutions.net/ocn/python/canvas2.py">http://www.4dsolutions.net/ocn/python/canvas2.py</a> <- Tk canvas</div>
<div> </div>
<div>Kirby</div>
<div> </div>
<div>PS: I haven't tested the PIL version for 2.5 yet, seein' as all the recent </div>
<div>traffic has been about using Tk.</div>
<div> </div>
<div>PPS: this code isn't procedural though, may not be suitable for CS0 </div>
<div>within the United States (a math phobic distopia, except in patches)</div>
<div> </div>
<div>[1] <a href="http://mathworld.wolfram.com/Rule30.html">http://mathworld.wolfram.com/Rule30.html</a></div>
<div> </div>
<div> </div></div></div>