tutorials:a-beginners-tutorial
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:a-beginners-tutorial [2024/12/19 11:56] – [Simple plant, consisting of an internode and an apical meristem] Tim | tutorials:a-beginners-tutorial [2024/12/19 13:34] (current) – barley1965 | ||
---|---|---|---|
Line 28: | Line 28: | ||
After this you click on ‘Install’ and wait for the installation to finish (this can take more than ten minutes). | After this you click on ‘Install’ and wait for the installation to finish (this can take more than ten minutes). | ||
- | After the installation, | + | After the installation, |
GroIMP will now be available either on your desktop or in the list of programmes: | GroIMP will now be available either on your desktop or in the list of programmes: | ||
Line 47: | Line 47: | ||
{{: | {{: | ||
- | Note that on your machine, the naming of the menu items might vary, due to the language settings of your Java version (I have a French Java installation, so some of the menu items will appear | + | Note that on your machine, the naming of the menu items might vary, due to the language settings of your Java version (in this tutorial, the menu items will appear in English).\\ |
GroIMP is a multi-windows platform, i.e. it consists in fact of a (large) number of windows, which can be piled upon each other (like the sheets in an Excel file), “glued” side by side, or be viewed separately (this is handy if your computer is connected to more than one computer screen). To change the size of an integrated window you can simply click and drag on one of the grey hatched lines separating two windows. To change the position of a window you can click on the tab, hold and drag the whole window to its new position. You will see on your left a window called “View”, which contains the visual output of a model (currently a blue cylinder on its side, with a label “A” below it) and on your right a window called “jEdit – Alga.rgg”, | GroIMP is a multi-windows platform, i.e. it consists in fact of a (large) number of windows, which can be piled upon each other (like the sheets in an Excel file), “glued” side by side, or be viewed separately (this is handy if your computer is connected to more than one computer screen). To change the size of an integrated window you can simply click and drag on one of the grey hatched lines separating two windows. To change the position of a window you can click on the tab, hold and drag the whole window to its new position. You will see on your left a window called “View”, which contains the visual output of a model (currently a blue cylinder on its side, with a label “A” below it) and on your right a window called “jEdit – Alga.rgg”, | ||
Line 61: | Line 61: | ||
{{: | {{: | ||
- | From the lecture, you will already know that the text in line 24 is a rule, with a left-hand-side and a right-hand-side. The keyword ‘Axiom’ refers to the start word of the L-system, and ‘==> | + | The text in line 24 is a rule, with a left-hand-side and a right-hand-side. The keyword ‘Axiom’ refers to the start word of the L-system, and ‘%%==>%%’ is an operator that essentially means “// |
{{: | {{: | ||
Line 72: | Line 72: | ||
Let’s have a closer look at the code surrounding the Axiom rule: | Let’s have a closer look at the code surrounding the Axiom rule: | ||
- | protected void init () | + | '' |
init () is what is called a method in the Java language. Whenever you see a name followed by a pair of simple brackets, (), you can be almost certain that you are dealing with a method. A method is a little //programme within the programme//, | init () is what is called a method in the Java language. Whenever you see a name followed by a pair of simple brackets, (), you can be almost certain that you are dealing with a method. A method is a little //programme within the programme//, | ||
Line 168: | Line 168: | ||
Open Ex08.gsz ([[# | Open Ex08.gsz ([[# | ||
+ | <code java> | ||
F(x/3) RU(-60) F(x/3) RU(120) F(x/3) RU(-60) F(x/3) | F(x/3) RU(-60) F(x/3) RU(120) F(x/3) RU(-60) F(x/3) | ||
+ | </ | ||
Suppose we want to change the angle of the RU rotation, from 60 and -60 to 55 and -55. We could do this manually by changing all the arguments one by one (note that we replaced 120 by 2*55=110): | Suppose we want to change the angle of the RU rotation, from 60 and -60 to 55 and -55. We could do this manually by changing all the arguments one by one (note that we replaced 120 by 2*55=110): | ||
F(x/3) RU(-55) F(x/3) RU(110) F(x/3) RU(-55) F(x/3) | F(x/3) RU(-55) F(x/3) RU(110) F(x/3) RU(-55) F(x/3) | ||
Line 586: | Line 587: | ||
] | ] | ||
- | public void executer | + | public void run () |
[ | [ | ||
A ==> A B; | A ==> A B; |
tutorials/a-beginners-tutorial.1734605818.txt.gz · Last modified: 2024/12/19 11:56 by Tim