I just got my hands on Python for rhino last week (more specifically on a package called ironpython), because I wanted to try out the capabilities and the adaptive character of this powerful scripting/coding language. What is interesting in the case of ironpython is the import of both the rhinoscript syntax and the Rhinocommon elements within the Grasshopper3d environment. Having prior programming experience python is fairly easy to learn and quite user friendly. The feature of debugging without compiling the code is also really useful.
To test the scripting possibilities of Python I wrote a 2-state cellular automaton based on this code from Processing on Worlfram 2d CA’s. I have implemented both Rhinocommon and rhinoscript syntax commands and members in the code, plus I have introduced some time based evolving just to make the simulation dynamic.
The algorithm can create a variety of patterns, emerging from the initial rule defining the state relation between the automata (ie. the famous rule 110). The parameters of the python component are the number of the rule used, the width of the drawing grid, the size of the cell and the time. The process becomes kind of slow after a few iterations because lots of geometry is being generated, thus if the boxes were to be replaced by simple points the algorithm would have a much better performance.
Here is a small video documenting the process.
This is a snapshot of the grasshopper definition. I plan to release the code after I clean it up a little bit, so stay tuned if you want to try it out.