On 6/9/08, Fred lunnon <fred.lunnon@gmail.com> wrote:
On 6/9/08, James Propp <jpropp@cs.uml.edu> wrote:
(One thing I'd like is a simple way to create an m-by-n array of small cells with specified colors. What's the right tool for that job?)
This is something I like to do a lot of --- I spent ages coding up an OpenLook (did someone say "yerwot?") interactive viewer for number walls modulo a prime to display them in this fashion --- now I don't use a Sun any more, the software is U/S.
I also wrote an interactive cellular automaton simulator in Java, using the same display technique --- that at least is pretty portable, though the display would not stand alone without some modification ...
In any case, I presume you want to output to some file format (e.g. PDF), rather than interactive display? Though one could always screen grab, in small quantities anyway ...
My resolve stiffened by this enquiry, I ran up a Maple procedure to output a 2D list (array) of integers as an array of (super)-pixels: in principle it delivers up to 27 distinct shades. Having displayed it, user can then tweak the size via dragging the image frame corners, delete axes etc; export as a .GIF file (.JPG is lossy, and .EPS delivers rubbish on anything of nontrivial size); convert latter to .PDF etc via (Mac) Preview etc utilities. Maple 9 does fall over rather regularly if the image is enlarged much, and the whole rpocess is somewhat fiddly --- but if it's any use to anyone out there, I'll strip it out (from its current home inside my Maple number wall utility) and email the (modest) source code. Fred Lunnon