source: experiments/frams/foraminifera/data/scripts/foraminifera.show @ 407

Last change on this file since 407 was 407, checked in by Maciej Komosinski, 9 years ago

More human-friendly high-level description for theater foraminifera visualization

File size: 1.8 KB
Line 
1show:
2name:Reproduction of benthic foraminifera
3info:~
4Foraminifers are shown as green balls. Nutrients are tiny white boxes.
5Foraminifers move towards nearest nutrients and try to accumulate a sufficient amount of energy to reproduce.
6Haploid and diploid generations alternate. Diploid foraminifers have orange marks.
7More information at www.framsticks.com/foraminifera
8~
9expdef:foraminifera
10code:~
11
12function onLoad()
13{
14        Simulator.init();
15        GLDisplay.desiredsimspeed = 50;
16        GLDisplay.minfps = 10;
17}
18
19function ShowParams_minimalVolume_set()
20{
21        switch (ShowParams.minimalVolume)
22        {
23        case 0:
24                ExpParams.v_min_h = 300;
25                ExpParams.v_min_d = 300;
26                break;
27        case 1:
28                ExpParams.v_min_h = 150;
29                ExpParams.v_min_d = 500;
30                break;
31        }
32}
33
34function ShowParams_offspingNumber_set()
35{
36        switch (ShowParams.offspingNumber)
37        {
38        case 0:
39                ExpParams.ofnumh = 300;
40                ExpParams.ofnumd = 300;
41                break;
42        case 1:
43                ExpParams.ofnumh = 150;
44                ExpParams.ofnumd = 500;
45                break;
46        }
47}
48
49function ShowParams_populationSize_set()
50{
51        switch (ShowParams.populationSize)
52        {
53        case 0:
54                ExpParams.psize = 5;
55                break;
56        case 1:
57                ExpParams.psize = 10;
58                break;
59        case 2:
60                ExpParams.psize = 15;
61                break;
62        case 3:
63                ExpParams.psize = 20;
64                break;
65        }
66}
67
68function ShowParams_feedRate_set()
69{
70        switch (ShowParams.feedRate)
71        {
72        case 0:
73                ExpParams.feedrate = 0.5;
74                break;
75        case 1:
76                ExpParams.feedrate = 0.7;
77                break;
78        case 2:
79                ExpParams.feedrate = 0.9;
80                break;
81        }
82}
83
84~
85
86
87prop:
88id:minimalVolume
89name:Min reproduction energy haploid/diploid
90type:f 0 1 ~300 / 300~150 / 500
91
92prop:
93id:populationSize
94name:Initial population size
95type:d 0 3 ~5~10~15~20
96
97prop:
98id:offspingNumber
99name:Number of offspring haploi/diploid
100type:d 0 2 ~20 / 4~10 / 5
101
102prop:
103id:feedRate
104name:Feeding rate
105type:d 0 2 ~50~70~90
Note: See TracBrowser for help on using the repository browser.