The animated GIF at right will no doubt be used as yet another example as the story of Life in a Tube comes together, although more because it is neat than because it says anything very profound. The reason for showing it now is because I'm allowing myself to feel somewhat pleased to have finally created a reasonably efficient basis for producing more of the same. This one got the number one guernsey because it was handy and relatively simple. With Unisys's patent on GIF's LZW compression expiring this month, GIF is suddenly back in town as the way to deliver black and white animations, so I managed to allocate a chunk of the recent long weekend to building functions which parse and create such GIFs while staying well clear of the much richer graphical environments that are available through CPAN modules. The code to generate Life in a Tube has been in use for a while, the previous version having some heavy optimisation aimed towards systmmatic exploration of a particular subset of starting patterns, but still not being quite efficient enough to use to produce animations which start 10,000+ generations into growth from a simple seed. The practical solution turns out to be to use the oft mentioned LifeLab to generate and save the first generation to be included in the animation. LifeLab saves patterns in the widely used and readily decoded RLE (Run Length Encoded) file format. At the time of posting, the animation parameters were hard coded into a Perl script which could be run locally from BBEdit, but it is intended to incorporate the logic into modules and thus into a CGI script which will enable the necessary animations to be rolled out even more efficiently. Fig: 16 generations of a simple detached border leaves a trail of pentadecathlons, a well known period 15 oscillator. The interrelationship between the 15 and 16 generation cycles involved means that while the pentadecathlons appear to travel down the animation, their actual oscillation sequence is laid out in the opposite direction. |