Changeset 559 for experiments
- Timestamp:
- 08/02/16 21:21:29 (8 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r557 r559 126 126 //addSpecies({"min_repro_energies" : [4,8]}); 127 127 128 //Simulator.print(create_genotype(0. 1, 30)); //sample call129 //Simulator.print(create_genotype(0. 2, 30)); //sample call128 //Simulator.print(create_genotype(0.2, 20, "1.0,1.0,0.0", 0.6)); //sample call 129 //Simulator.print(create_genotype(0.1, 30, "1.0,0.5,0.0", 0.1)); //sample call 130 130 } 131 131 -
experiments/frams/foraminifera/data/scripts/foraminifera.inc
r558 r559 1 1 2 function create_genotype(proculus_size, number_of_chambers, rgbstring )2 function create_genotype(proculus_size, number_of_chambers, rgbstring, lastchambergrowth) //lastchambergrowth is 0..1 3 3 { 4 4 const shift=0.7; … … 11 11 for(var i=0;i<number_of_chambers;i++) 12 12 { 13 str+="p:sh=1,sx=%g,sy=%g,sz=%g,vr=%s\n" % size % size % size % rgbstring; 13 var effectivesize=size; //'effectivesize' is introduced only to consider the last chamber 14 if (i==number_of_chambers-1) 15 { 16 effectivesize*=lastchambergrowth; 17 size=size*(1.35-0.35*lastchambergrowth); //last interation: 'size' is only used for shifting (dx). The last chamber emerges at the surface of the previous one 18 } 19 str+="p:sh=1,sx=%g,sy=%g,sz=%g,vr=%s\n" % effectivesize % effectivesize % effectivesize % rgbstring; 14 20 if (i>0) 15 21 str+="j:%d,%d,sh=1,dx=%g,ry=%g\n" % (i-1) % i % (size*shift) % (angle_delta+i*angle_delta_delta);
Note: See TracChangeset
for help on using the changeset viewer.