Changeset 559 for experiments


Ignore:
Timestamp:
08/02/16 21:21:29 (8 years ago)
Author:
Maciej Komosinski
Message:

Foram genotype generator can produce genotypes with the last chamber smaller ("growing" from 0 to 1)

Location:
experiments/frams/foraminifera/data/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experiments/frams/foraminifera/data/scripts/foraminifera.expdef

    r557 r559  
    126126        //addSpecies({"min_repro_energies" : [4,8]});
    127127       
    128         //Simulator.print(create_genotype(0.1, 30)); //sample call
    129         //Simulator.print(create_genotype(0.2, 30)); //sample call
     128        //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
    130130}
    131131
  • experiments/frams/foraminifera/data/scripts/foraminifera.inc

    r558 r559  
    11
    2 function create_genotype(proculus_size, number_of_chambers, rgbstring)
     2function create_genotype(proculus_size, number_of_chambers, rgbstring, lastchambergrowth) //lastchambergrowth is 0..1
    33{
    44        const shift=0.7;
     
    1111        for(var i=0;i<number_of_chambers;i++)
    1212        {
    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;
    1420                if (i>0)
    1521                        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.