Crates.io | cellular |
lib.rs | cellular |
version | 0.1.2 |
source | src |
created_at | 2021-06-27 01:48:02.826586 |
updated_at | 2021-06-27 02:21:26.12092 |
description | A simple command-line based cellular automaton animation creator |
homepage | |
repository | https://github.com/W-A-James/cellular |
max_upload_size | |
id | 415319 |
size | 377,986 |
cellular
is a command-line tool that allows for generation of gif images using elementary cellular automata. (Read more about elementary cellular automata here.) It supports starting automata with random seeds as well as providing initial inputs directly through the command line or from a file.
cargo install cellular
Download the latest release tarball and execute the following:
tar -xvzf cellular-x.y.z.tar.gz .
cd cellular
cargo install --path .
Note that x.y.z
is the version number of the tarball that you downloaded.
Run the following to see all available options and flags
cellular --help
cellular --width 800 --height 600 --frames 100 --density 0.6 --rule 106 --output hello_cellular.gif
or
cellular -w 800 -h 600 -f 100 -d 0.6 -r 106 -o hello_cellular.gif
All options and their shortcut syntax are shown when the help flag is passed
→ cellular --help
cellular
A simple command-line based cellular automaton animation creator
USAGE:
cellular [FLAGS] [OPTIONS] --frames <frames> --height <height> --width <width>
FLAGS:
--help Prints help information
-n, --no-prog disable progress bar
-V, --version Prints version information
OPTIONS:
-b, --bitmap <bitmap> Input bitmap as string of 1s and 0s
-d, --density <density> Probability that each cell in initialized bit vector will be occupied. Should be between
0.0 and 1.0 [default: 0.5]
-f, --frames <frames> Number of frames in final animation
-h, --height <height> Specifies height of output image
-i, --infile <infile> path to file containing initial bitmap as string of 1s and 0s
-o, --output <output> Specifies output file. Defaults to output_w<width>_h<height>_f<frames>_r<rule>.gif
-r, --rule <rule> 8 bit unsigned integer which specifies the cellular automaton to simulate [default: 110]
-w, --width <width> Specifies width of output image
echo "10010111000111" > file
cellular --bitmap 10010111000111 -h 600 -f 100 -d 0.6 -r 106 -o hello_cellular.gif
echo "10010111000111" > file
cellular --infile file -h 600 -f 100 -d 0.6 -r 106 -o hello_cellular.gif
cellular -b 1100111101110100110100011011111110101111101110111001010110011010010001010011111011101110000011100100 -h 100 -f 200 -r 106