App-GUI-Cellgraph
view release on metacpan or search on metacpan
NAME
App::GUI::Cellgraph - draw pattern by cellular automata
SYNOPSIS
1. read this POD page
2. start the program in shell: >"cellgraph"
3. push buttons and see preview patterns change
4. push button *Draw* in right bottom corner (or "Ctrl+D") to get a
full picture
5. choose *"Save"* in Image menu (or "Ctrl+S") to store image in a PNG
/ JPEG / SVG file (choose image size beforehand in menu "Image" >
"Size" > ...)
6. choose *"Write"* in *"Settings"* menu ("Ctrl+W") to save current
settings into an INI file for loading it and tweaking the parameters
later
After first use of the program, a config file will be created under
*~/.config/cellgraph* in your home directory. It contains mainly
stored colors and dirs where to load and store setting files. You
may change it manually or deleted it to reset it to default.
DESCRIPTION
This graphical application uses cellular automata logic, as described in
*Steve Wolfram*s book *"A new kind of science"*, to paint tiled
pictures. Although, the original concept got expanded by many additional
options and functionalities.
It is meant for fun, leasure, beautiful, personalized images and a
deeper understanding about how cellular automatons work.
Mechanics
Every tile (square) in the picture represents one automaton (called
cell). The tile color depicts the state of that cell. The state is just
an one digit number (0 or 1 at start). To see and change which color
stands for which state - choose the rightmost tab titled "*Colors*". The
uppermost row of the picture represents a row of automata in its initial
state, that is given by the user via settings in the second tab
("*Starting Row*"). The row below is painted by the same string of
cells, just after one round of computation later and so forth. The
vertical Y-axis is so to speak the time axis, with top being the
beginning and bottom the end.
During each round of computation every cell might change its state. It
depends on which subrule matches. Each subrule is layed out as a row at
the third tab ("*State Rules*"). On a left side of the arrow (=>) you
see there a number of colored tiles. At the beginning its three tiles,
representing our focal automaton in the middle and its left neighbour on
its left flank and its right neighbour on the right. In case all three
colors around our example cell are as displayed, then the new state of
this cell can be read on the right side of the arrow. Its also called
the result of this sub-rule. Of course this was simplified, since many
options might complicate that picture, as decribed in next paragraphs.
One big addition are action rules. Parallel to its state, every cell has
also an activity value. It starts with a value also set in the
"*Starting Row*" tab. It drops every round by a fixed amount but it also
gets raised depending on the result of action rules. Only if the
activity value reaches a threshold, the cell can change its state. More
details about this mechanics are to be found in the chapter "*General
Settings*" and "*Action Rules*".
GUI
The general layout is very simple: the picture gets drawn on the left
window side. On the right side you change the settings from which the
picture is computed. Please note there the tabs, in the top row. They
select which page of settings is visible.
Please mind the tool tips - short help texts which appear if the mouse
stands still over a button. Also helpful are messages in the status bar
at the bottom that appear while browsing the menu of after a command
given.
General Settings
The first tab contains settings, that shape the drawing in the most
broad way. It is segmented into three parts that somewhat parallel the
last three tabs.
The topmost section sets the framework for rules by which the cell state
changes - computation round by computation round. Input Size appoints
the size of neighbourhood, the left side of an subrule. If you set it to
an odd number like 5, then the cells current state plus its two
neighbours on each side determine the next state of a cell. But if you
set it to an even number like 2 then only one neighbour on each side has
this power, but not the focal cell itself. You can recognize this by the
struck through middle cell in each subrule in the "*State Rules*" tab.
( run in 0.960 second using v1.01-cache-2.11-cpan-5623c5533a1 )