linelife
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Conway's Game of Life in one dimension
Please view the file 'linelife.html' for a general introduction to Linelife,
and the provided man page for information on using the linelife program.

This package contains the following files:
linelife.html  -- general introduction to Linelife
linel.1        -- man page for linelife
linel.cpp      -- source code for the linelife program
llvisual.c     -- source code for the llvis program; see below
Makefile       -- makefile for building linel&llvis
llgen.c        -- program for exhaustive sequence testing
ll2num.sh    \
lldetectper.sh\-- shell scripts for manipulating Lifeline sequences; see below
llpicture.sh  /
llanimate.sh /
crawler.gif    -- an animation of a "crawler"
period40.gif  \-- an animation & picture of a periodic pattern with period 40
period40.pbm  /
                  


ll2num.sh is a script to interpret a Linelife pattern (a string consisting of
'0's and '1's) as a binary number which is then output in decimal and
hexadecimal. Please take a look at the script for more information.


lldetectper.sh is used to detect periodicity of lifeline patterns (as in,
generation N is always the same as generation N+M for some M>1).


llpicture.sh generates a 2-D picture from a lifeline run, where the other
dimension is time.


llanimate.sh is a script to generate animations from linelife runs. It uses
the llvis program, described below, to generate the frames.


llvis reads a Linelife pattern from stdin and generates a png image based on it;
usually something resembling a barcode. The general invocation is
	llvis file.png -s 1 -h 50
where "file.png" is the output file, -h gives the height of the image to produce
(all rows in the image will be equal!), and -s gives the stepsize: how many
cells ('0's and '1's) to compress into a single pixel column. This is done by
taking an average "aliveness", so that if, for instance, the stepsize is 3, a
sequence "111" produces white, "000" produces black, and anything else produces
a gray of varying degree.
The produced images are 8 bpp grayscale.

Typically one would do something like
	echo 00101001010011100 | llvis mypic.png
or
	llvis myotherpic.png -s 4 < mystoredsequence

The Makefile will compile llvis, as well. You need to have libpng installed.


本源码包内暂不包含可直接显示的源代码文件,请下载源码包。