1 | show:
|
---|
2 | name:Benthic foraminifera
|
---|
3 | info:~
|
---|
4 | There are two species of Foraminiera: longitudal and coiled. The first chamber of the longitudal species has orange marks. Haploid and diploid generations alternate in both species. All chambers of the haploid generation have the same size. In the diploid generation, subsequent chambers are bigger than their predecessors.
|
---|
5 |
|
---|
6 | Nutrients are shown as tiny green cylinders. Foraminifers move towards nearest nutrients and this way they can accumulate enough energy to reproduce.
|
---|
7 |
|
---|
8 | When the "Enhance visualization" option is enabled, reticulopodia are shown as large disks and positions of nutrients are indicated by cuboids.
|
---|
9 |
|
---|
10 | More information at www.framsticks.com/foraminifera
|
---|
11 | ~
|
---|
12 | expdef:foraminifera
|
---|
13 | code:~
|
---|
14 |
|
---|
15 | global Params; //to easily transfer changes in identical properties from this show to expdef
|
---|
16 | global last_simspeed; //to display time scale when it changes significantly
|
---|
17 |
|
---|
18 | function onLoad()
|
---|
19 | {
|
---|
20 | Simulator.init();
|
---|
21 | last_simspeed=0;
|
---|
22 | GLDisplay.desiredsimspeed = 50;
|
---|
23 | GLDisplay.minfps = 10;
|
---|
24 | TrackingCam.cam_h = 15; //more side view
|
---|
25 | Params = { "foodperiod" : [43200,25920,10800], "feedtrans" : [0.0005,0.001,0.002],"energy_nut" :[144.54,544.54,944.54], "stress" : [0,1], "visualize" : [0,1]};
|
---|
26 | ShowProperties.visualize=1;
|
---|
27 |
|
---|
28 | //useful for screenshots:
|
---|
29 | //GLDisplay.world_visibility=2+4; //show only environment and creatures (no background)
|
---|
30 | //GLDisplay.bgcolor=0xffffffff; //white background
|
---|
31 | }
|
---|
32 |
|
---|
33 | function timeScale()
|
---|
34 | {
|
---|
35 | //just a draft, this function and all constants in expdef need serious review
|
---|
36 | var localDriveMicronsPerStep=framsToMicrons(getMovePerStep());
|
---|
37 | var foramSpeedMmPerSec=ExpProperties.foramSpeedMmPerMin/60;
|
---|
38 | var localDriveMmPerStep=localDriveMicronsPerStep/1000;
|
---|
39 | var localDriveMmPerSec=localDriveMmPerStep*Simulator.simspeed;
|
---|
40 | return localDriveMmPerSec/foramSpeedMmPerSec;
|
---|
41 | }
|
---|
42 |
|
---|
43 | function updateBanner()
|
---|
44 | {
|
---|
45 | GLDisplay.banner="World size is %g mm." % (framsToMicrons(World.wrldsiz)/1000);
|
---|
46 | GLDisplay.banner+="\nShowing real-time x %g." % timeScale();
|
---|
47 | }
|
---|
48 |
|
---|
49 | function onShowStep()
|
---|
50 | {
|
---|
51 | if (Simulator.simspeed<last_simspeed*0.9 || Simulator.simspeed>last_simspeed*1.1) //significant change
|
---|
52 | {
|
---|
53 | updateBanner();
|
---|
54 | last_simspeed=Simulator.simspeed;
|
---|
55 | }
|
---|
56 | }
|
---|
57 |
|
---|
58 | function setShowParam(param_id)
|
---|
59 | {
|
---|
60 | ExpProperties.[param_id] = Params[param_id][ShowProperties.[param_id]];
|
---|
61 | }
|
---|
62 |
|
---|
63 | function ShowProperties_foodperiod_set()
|
---|
64 | {
|
---|
65 | setShowParam("foodperiod");
|
---|
66 | }
|
---|
67 |
|
---|
68 | function ShowProperties_feedtrans_set()
|
---|
69 | {
|
---|
70 | setShowParam("feedtrans");
|
---|
71 | }
|
---|
72 |
|
---|
73 | function ShowProperties_energy_nut_set()
|
---|
74 | {
|
---|
75 | setShowParam("energy_nut");
|
---|
76 | }
|
---|
77 |
|
---|
78 | function ShowProperties_stress_set()
|
---|
79 | {
|
---|
80 | setShowParam("stress");
|
---|
81 | }
|
---|
82 |
|
---|
83 | function ShowProperties_visualize_set()
|
---|
84 | {
|
---|
85 | setShowParam("visualize");
|
---|
86 | }
|
---|
87 |
|
---|
88 | ~
|
---|
89 |
|
---|
90 | property:
|
---|
91 | id:foodperiod
|
---|
92 | name:Feeding period
|
---|
93 | type:d 0 2 1 ~Low~Medium~High
|
---|
94 |
|
---|
95 | property:
|
---|
96 | id:feedtrans
|
---|
97 | name:Energy transfer
|
---|
98 | type:d 0 2 1 ~0.05~0.125~0.25
|
---|
99 |
|
---|
100 | property:
|
---|
101 | id:energy_nut
|
---|
102 | name:Nutrient energy
|
---|
103 | type:d 0 2 1 ~0.5~1.5~3
|
---|
104 |
|
---|
105 | property:
|
---|
106 | id:stress
|
---|
107 | name:Stress
|
---|
108 | type:d 0 1 1
|
---|
109 |
|
---|
110 | property:
|
---|
111 | id:visualize
|
---|
112 | name:Enhance visualization
|
---|
113 | type:d 0 1 0
|
---|