77 lines
10 KiB
Plaintext
77 lines
10 KiB
Plaintext
\input texinfo
|
|
@c https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.pdf
|
|
@setfilename gem-graph.texinfo
|
|
@settitle Gem-Graph manual
|
|
@copying
|
|
Gem-graph manual.
|
|
|
|
Texinfo edition. 2024-11-26
|
|
|
|
Copyright @copyright{} 2024 Jean 'jean' Sirmai
|
|
|
|
@quotation
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
|
any later version published by the Free Software Foundation; with no
|
|
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
|
Texts. A copy of the license is included in the section entitled
|
|
``GNU Free Documentation License''.
|
|
@end quotation
|
|
@end copying
|
|
|
|
@titlepage
|
|
@title Gem-Graph Manual 1.0
|
|
@page
|
|
@vskip 0pt plus 1filll
|
|
@insertcopying
|
|
@end titlepage
|
|
|
|
@contents
|
|
@node Root
|
|
@c (version @value{VERSION}, @value{UPDATED}).
|
|
@node Introduction
|
|
@chapter Introduction
|
|
@cindex Introduction
|
|
|
|
Welcome to Gem-graph !
|
|
@sp 1
|
|
Gem-graph lets you move and transform drawn objects using an automaton. It's an ideal tool for describing the evolution of a situation through drawing. Would you like to see your drawings evolve? Gem-graph provides you with automatic transformation tools that allow you to move from drawing to drawing so that their evolution best describes what you want. Not only is it your design, but you can also decide how it evolves! You can use gem-graph to make a game. You can use it to tell a story. You can use it to make a model of a phenomenon that interests you. You can represent what you want simply or in more realistic detail. Simple parts and more detailed parts can coexist in the same design. You can do it in two or three dimensions. You can watch what you've created evolve without intervening, or guide it by modifying your initial rules towards what you want to achieve. You can even mix several drawings and animations. You can observe them in detail, modify them, go back, start again, measure, compare and keep the sequences and other results that interest you so that you can play them again.
|
|
@sp 1
|
|
However, a certain amount of effort will be required to achieve this. A complicated model will require more work than a simpler one, but it is possible to start with something quite simple and develop it step by step. In any case, you must draw what you want to see and say how you want it to be transformed. Gem-graph cannot do that for you. However, it does have powerful tools to help you. Gem-graph - short for 'geometric graph' - is a redrawing system. Its strength lies in the fact that it deals only with very simple drawing elements, all of which are similar. All the static information - your initial drawing - is an arrangement of these elements in the space. All the dynamic information - your redrawing rules - transform what you draw as you wish. All the gem-graph rules, whatever their complexity, are only associations of an unique simple pattern: one condition on one element triggers one action on the same element. Due to this very simple structure, any set of complex rules, no matter how many there are, can always be processed automatically by the gem-graph automaton. The tools provided by gem-graph give you access to this power to create and animate your drawings, and this manual is here to help you learn how to master them.
|
|
@sp 1
|
|
One way of doing this is to reproduce very simple examples, such as when a programming language asks you to write "Hello world". For gem-graph, the equivalent of "Hello world" will be to move a small line on your screen. This example and other simple ones that follows will progressively give you an approach of what gem-graph can do and enable you to build and animate much more complex drawings that suit your desires. If you like learning this way, @xref {node_gem_graph_by_example, Gem-graph by example, Hello world, Gem-graph by example}. If you prefer to learn by reading what the commands you see on the screen are doing, they have been detailed here (_learn_commands). The table of contents is another way to learn. It goes from the simplest to the most complicated. How to set up a simple model (_simple_model), observe it (_simple_observation), measure what it does (_simple_measurements) and display the results (_simple_results), then transform it by changing what you see (_simple_state_edition) and how it reacts (_simple_rule_edition). You can directly deal in with the details of gem-graph mechanism itself (_gem_graph_mechanism). You may also whish to compare gem-graph to other classes of automata that do quite similar things (_spatial_automata_classification), and examine what it can and cannot actually do and what its scope of application is (_gem_graph_theory).
|
|
|
|
@node node_gem_graph_by_example
|
|
@chapter Gem-graph by example
|
|
@cindex Gem-graph by example
|
|
|
|
|
|
@section Hello world
|
|
@cindex Hello world
|
|
@anchor {hello_world} Our "Hello world" is the simplest program that gem-graph can execute. It consists of a single short arrow, which moves in a straight line in a single direction. To do this, we first had to draw this little arrow and then make it move. The result is certainly not very exciting, but this example is enough to show how a gem-graph drawing is made and how it is animated. One rule and one state are enough. The rule only says: if an arrow is drawn here, I erase it and redraw it on the next square. For the moment, you can ignore how the automaton works (the details are in _gem_graph_mechanism). The model is assumed to evolve in a small flat space which is described here (_hello_world_space). All that gem-graph needs to know to execute such models is written in the "Hello world" file (_hello_world_file). Note that all the gem_graph models will have basically the same structure, making them easy to copy and share. How to execute this example is explained here (_hello_world_exec). You can now detail this first example (_hello_world) or continue reading to have a first approach of what the next models will show you.
|
|
@sp 1
|
|
@section Random walk
|
|
@cindex Random walk
|
|
@anchor {random_walk} From this first model, it is possible to give the arrow the possibility of moving in two directions: forwards or backwards, and to ensure that these movements occur randomly. This second model therefore describes a "random walk". To do this, we need to add a second rule which only says: if an arrow is drawn here, I erase it and redraw it on the previous square. A random draw is also necessary to determine whether the first or second rule applies. With these two rules and the random draw, the arrow now sometimes advances and sometimes retreats at random. The detailed description is here: (_random_walk).
|
|
@sp 1
|
|
@section Multiple random walks
|
|
@cindex Multiple random walks
|
|
@anchor {multiple_random_walks} The next example shows how these two rules can be applied to a several states. To test this, we start by populating the space by randomly distributing in it a large number of arrows all with the same orientation. We now need to adapt our rules by checking that the square where one arrow could go is free. If not, the arrow will not be moved. Once the rules have been modified in this way, they can be applied to any arrow in the space. When you set the model in motion, you will see all these small lines moving at random towards left or right (_horizontal_random_walks). This shows that the gem-graph automaton is constantly exploring the whole space to see where the rules you have designed can be applied.
|
|
By adapting the previous example, it's easy to create another model where the arrows are vertical and move randomly from bottom to top or top to bottom (_vertical_random_walks).
|
|
@sp 1
|
|
@section Pendulum
|
|
@cindex Pendulum
|
|
@anchor {pendulum} In the previous random walk models all the states were similar (one arrow) even if there were many of them and there were only two rules (forward/backward). Now here's a model with two states and two rules: the "pendulum" (_pendulum). This time, the arrow can be drawn either tilted forwards or tilted backwards and the two rules switch the drawn arrow from one state to the other or vice versa. The pendulum does not change places. It only moves from left to right and vice versa. You can slow down the programme to observe the movements better (_gem_graph_commands). It could be a good starting point to draw a complete clock or a solar system.
|
|
@sp 1
|
|
@section Random walks plus pendulum
|
|
@cindex Random walks plus pendulum
|
|
@anchor {random_walks_plus_pendulum} An amazing feature of gem-graph is that it is possible to add the three previous models and make them work together (_random_walks_plus_pendulum). This addition is immediate because these three models are independent. If they were not, and if a rule in one applied to a state in another, it would be up to you to change it or slightly modify one of the states. Gem-graph can't do this for you, but it can detect such situations and provide you with tools that automate or at least facilitate the merging operation (_gem_graph_addition).
|
|
@sp 1
|
|
Once the addition automatically operated, we see little lines moving simultaneously and at random from left to right or vice versa if they are horizontal, and from top to bottom or vice versa if they are vertical. Their number is constant. They don't change shape or direction. There seems to be no accident when they cross. The pendulum is here also, who continues to come and go, oblivious to all the commotion. We could have drawn several of them, but without guaranteeing their synchronisation! Nothing else happens (_random_walks_plus_pendulum).
|
|
@sp 1
|
|
This resulting model, because it shows a multitude of diverse and simultaneous movements, perhaps gives the impression of a more complex system. It would be easy to make it even more complex, by trying to represent, for example, the traffic of a city in all its diversity, a video game or the metabolism of a cell, but the value of the gem-graph is the way in which it can be used to analyse and control this complexity. At this point, it's time to take a look at the mechanism (_gem_graph_mechanism) and theory (_gem_graph_theory) of gem-graph and compare gem-graph to other classes of automata that do quite similar things to better understand how the profound simplicity of its automaton allows it to embrace such a wide range of situations and behaviours simultaneously but also what it can and cannot do easily and what its scope is (_spatial_automata_classification).
|
|
|
|
@unnumbered Index
|
|
@printindex cp
|
|
@bye
|