I would like to start with a sequence of arrays of 1s and 0s (each array representing a 2 dimensional pattern of on off pixels) and create a simple black and white video of this sequence. controling pixel size and image size and length of time per frame would be good too.
basically it would be a video of a program to execute a cellular automaton.
is there a way to do this without first creating 100 or so image files and then constructing the video from them? (say with avconv?)
if not, what is the simplest way to create each image file?
i would like to use the simplest tools possible without a 1000 bells and whistles. (i'd like to avoid having to wade through matplotlib or pygame or pil etc..i have trouble wading through the documentation)
adding text and audio would be a later step. i just want the bare bones first thanks.
Unfortunately,
matplotlib
andPillow
(the replacement forPIL
) are two of the best modules that come to mind for creating images and animating them. Combine them with aNumPy
array of your pixels, and you have a very straightforward way of proceeding. Assuming you already know how to program in Python, the learning curve isn't too steep, once you grasp how everything is laid out.I haven't delved as deeply into Pillow yet, but I know from personal experience that the
matplotlib
documentation actually isn't too bad, and there are a ton of examples on their website. It has interfaces forffmpeg
,avconv
, and other converters, so if you're already familiar with them you're halfway there. And remember, if you have specific questions along the way, StackOverflow is always here :)Good luck!