Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Of course, you can do anything with Traits that can with Python!</p> <p>Seriously though, I presume your question is really about generating a GUI in which to display the CA. In that case I can recommend Mayavi which is based on Traits. It has a surf function which plots an array of regularly-spaced data as a 3D surface. There are docs on animating the data which shows how to change the underlying surface data for very fast rendering, which I have used and works well. I have a 3D numpy array shape=(x,y,time) and then for each step I pass a slice to surface objects data object:</p> <pre><code>surf.mlab_source.scalars = array[:,:,timepoint_index] </code></pre> <p>Alternatively you could use Matplotlib's imshow for a 2D plot of the same data. There is a very good tutorial on embedding matplotlib in traits.</p> <p>One issue with using these large libraries (which themselves have many, many dependencies) is being able to distribute your application along with the libraries. I have successfully frozen a Mayavi/matplotlib/traits app on Mac using py2app and Windows using py2exe, starting from the Enthought Python Distribution, but it wasn't easy. However, if you just need it to work on your computer and generate results then both of these approaches will save you time over writing a graphics system for your cellular automata.</p> <p>Having said all that I also hear good things about GarlicSim (as cool-RR mentioned), which would seem to be custom-made for your purpose.</p> <p>Can't post links because this is my first post, I will add them later.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload