App-GUI-Cellgraph
view release on metacpan or search on metacpan
lib/App/GUI/Cellgraph.pm view on Meta::CPAN
$frame->Show(1);
$frame->CenterOnScreen();
$app->SetTopWindow($frame);
1;
}
sub OnQuit { my( $self, $event ) = @_; $self->Close( 1 ); }
sub OnExit { my $app = shift; 1; }
1;
__END__
=pod
=head1 NAME
App::GUI::Cellgraph - draw pattern by cellular automata
=head1 SYNOPSIS
=over 4
=item 1.
read this POD page
=item 2.
start the program in shell: >C<cellgraph>
=item 3.
push buttons and see preview patterns change
=item 4.
push button I<Draw> in right bottom corner (or C<Ctrl+D>) to get a full picture
=item 5.
choose I<"Save"> in Image menu (or C<Ctrl+S>) to store image in a PNG / JPEG / SVG file
(choose image size beforehand in menu "Image" > "Size" > ...)
=item 6.
choose I<"Write"> in I<"Settings"> menu (C<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
I<~/.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.
=back
=head1 DESCRIPTION
This graphical application uses cellular automata logic, as described in
I<Steve Wolfram>s book I<"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 B<fun>, leasure, B<beautiful>, personalized images
and a deeper B<understanding> about how cellular automatons work.
=for HTML <p>
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/30.png" alt="" width="300" height="300">
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/blauberg.png"alt="" width="300" height="300">
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/7io.png" alt="" width="300" height="300">
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/teppich2.png"alt="" width="300" height="300">
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/igt.png" alt="" width="300" height="300">
<img src="https://raw.githubusercontent.com/lichtkind/App-GUI-Cellgraph/main/example/POD/cascadestar.png" alt="" width="300" height="300">
</p>
=head1 Mechanics
Every tile (square) in the picture represents one automaton (called B<cell>).
The tile color depicts the state of that cell. The B<state> is just an one
digit B<number> (0 or 1 at start). To see and change which B<color> stands
for which state - choose the rightmost tab titled "I<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 ("I<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 ("I<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 B<action rules>. Parallel to its state, every cell has
also an activity value. It starts with a value also set in the
"I<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
"I<General Settings>" and "I<Action Rules>".
=head1 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.
=head2 General Settings
( run in 0.605 second using v1.01-cache-2.11-cpan-5623c5533a1 )