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 | // Since Theater is mostly for demos and visualization, we make the world smaller (than set by expdef) for clarity, and adjust other parameters accordingly
|
---|
21 | World.wrldsiz = 100;
|
---|
22 | var nutrient_multiple = 200;
|
---|
23 | Params = { "foodflux" : [0.000000037815, 0.000000075631, 0.00000015126], "feedtrans" : [0.0005, 0.001, 0.002], "energy_nut" : [nutrient_multiple * 144.54, nutrient_multiple * 544.54, nutrient_multiple * 944.54], "stress" : [0, 1], "visualize" : [0, 1]}; //a set of smaller food fluxes because of the smaller world
|
---|
24 | //larger initial energies result in fewer individuals that do not overcrowd the small world:
|
---|
25 | ExpProperties.energies0_haplo = 60;
|
---|
26 | ExpProperties.energies0_diplo = 3.75;
|
---|
27 | ShowProperties_foodflux_set(); //force call of the value change handler
|
---|
28 |
|
---|
29 | ShowProperties.visualize = 1; //calls value change handler
|
---|
30 | ExpProperties.secPerStep = 50;
|
---|
31 |
|
---|
32 | Simulator.init(); //calculates some parameters based on the current world size
|
---|
33 | last_simspeed = 0;
|
---|
34 | GLDisplay.desiredsimspeed = 50;
|
---|
35 | GLDisplay.minfps = 10;
|
---|
36 | TrackingCam.cam_h = 15; //more side view
|
---|
37 |
|
---|
38 | //useful for screenshots:
|
---|
39 | //GLDisplay.world_visibility=2+4; //show only environment and creatures (no background)
|
---|
40 | //GLDisplay.bgcolor=0xffffffff; //white background
|
---|
41 | }
|
---|
42 |
|
---|
43 | function timeScale()
|
---|
44 | {
|
---|
45 | //just a draft, this function and all constants in expdef need serious review
|
---|
46 | var localDriveMicronsPerStep = framsToMicrons(getMovePerStep());
|
---|
47 | var foramSpeedMmPerSec = ExpProperties.foramSpeedMmPerMin / 60;
|
---|
48 | var localDriveMmPerStep = localDriveMicronsPerStep / 1000;
|
---|
49 | var localDriveMmPerSec = localDriveMmPerStep * Simulator.simspeed;
|
---|
50 | return localDriveMmPerSec / foramSpeedMmPerSec;
|
---|
51 | }
|
---|
52 |
|
---|
53 | function updateBanner()
|
---|
54 | {
|
---|
55 | GLDisplay.banner = "World size is %g mm." % (framsToMicrons(World.wrldsiz) / 1000);
|
---|
56 | GLDisplay.banner += "\nShowing real-time x %g." % timeScale();
|
---|
57 | }
|
---|
58 |
|
---|
59 | function onShowStep()
|
---|
60 | {
|
---|
61 | if (Simulator.simspeed < last_simspeed * 0.9 || Simulator.simspeed > last_simspeed * 1.1) //significant change
|
---|
62 | {
|
---|
63 | updateBanner();
|
---|
64 | last_simspeed = Simulator.simspeed;
|
---|
65 | }
|
---|
66 | }
|
---|
67 |
|
---|
68 | function setShowParam(param_id)
|
---|
69 | {
|
---|
70 | ExpProperties.[param_id] = Params[param_id][ShowProperties.[param_id]];
|
---|
71 | }
|
---|
72 |
|
---|
73 | function ShowProperties_foodflux_set()
|
---|
74 | {
|
---|
75 | setShowParam("foodflux");
|
---|
76 | }
|
---|
77 |
|
---|
78 | function ShowProperties_feedtrans_set()
|
---|
79 | {
|
---|
80 | setShowParam("feedtrans");
|
---|
81 | }
|
---|
82 |
|
---|
83 | function ShowProperties_energy_nut_set()
|
---|
84 | {
|
---|
85 | setShowParam("energy_nut");
|
---|
86 | }
|
---|
87 |
|
---|
88 | function ShowProperties_stress_set()
|
---|
89 | {
|
---|
90 | setShowParam("stress");
|
---|
91 | }
|
---|
92 |
|
---|
93 | function ShowProperties_visualize_set()
|
---|
94 | {
|
---|
95 | setShowParam("visualize");
|
---|
96 | }
|
---|
97 |
|
---|
98 | ~
|
---|
99 |
|
---|
100 | property:
|
---|
101 | id:foodflux
|
---|
102 | name:Food flux
|
---|
103 | type:d 0 2 1 ~Low~Medium~High
|
---|
104 |
|
---|
105 | property:
|
---|
106 | id:feedtrans
|
---|
107 | name:Energy transfer
|
---|
108 | type:d 0 2 1 ~0.0001~0.001~0.01
|
---|
109 |
|
---|
110 | property:
|
---|
111 | id:energy_nut
|
---|
112 | name:Nutrient energy
|
---|
113 | type:d 0 2 1 ~28908~108908~188908
|
---|
114 |
|
---|
115 | property:
|
---|
116 | id:stress
|
---|
117 | name:Stress
|
---|
118 | type:d 0 1 1
|
---|
119 |
|
---|
120 | property:
|
---|
121 | id:visualize
|
---|
122 | name:Enhance visualization
|
---|
123 | type:d 0 1 0
|
---|