Changeset 496 for experiments


Ignore:
Timestamp:
04/15/16 02:10:12 (9 years ago)
Author:
oriona
Message:

Haploid and diploid morphologies changed.

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

Legend:

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

    r493 r496  
    8383        //world
    8484        SignalView.mode = 1;
    85         World.wrldwat = 500;
     85        World.wrldwat = 200;
    8686        World.wrldsiz = micronsToFrams(100000);
    8787        World.wrldbnd = 1;
     
    220220function addForam(species, iter, chambernum, ploid)
    221221{
    222         var geno = createForamMorphology(species_genes[species]->morphotype, ploid, chambernum);
     222        var geno = createForamMorphology(ploid, ploid, chambernum);
    223223        curColor = retColors[ploid];
    224224        var cr = Populations[0].add(geno);
     
    367367                var ret = Populations[2].add("//0\np:sh=3,sx=0.01,sy="+getZoneRange(cr,1)+",sz="+getZoneRange(cr,1)+",ry=1.57,vr="+curColor);
    368368                cr.data->reticulopodiacreature = ret;
     369                ret.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
    369370        }
    370371}
     
    403404        {
    404405                curColor = retColors[cr.data->lifeparams->gen];
    405                 var geno = createForamMorphology(getGene(cr, "morphotype", 0), cr.data->lifeparams->gen, chamber_num+1);
     406                var geno = createForamMorphology(cr.data->lifeparams->gen, cr.data->lifeparams->gen, chamber_num+1);
    406407                var cr2 = Populations[0].add(geno);
    407408
     
    486487function fence(pos, zone)
    487488{
    488         return Math.min(Math.max(0+zone,pos),World.wrldsiz-zone);
     489        return Math.min(Math.max(0,pos),World.wrldsiz);
    489490}
    490491
     
    614615
    615616                cr.getMechPart(0).orient.set(o);
    616                 if (visualization(cr))
    617                 {
    618                         cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
    619                 }
    620617
    621618                if (deathConditions(cr) == 1)
     
    630627
    631628                foramMove(cr);
     629
     630                if (visualization(cr))
     631
     632                {
     633                        cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
     634                }
    632635
    633636                var repro = foramReproduce(cr);
  • experiments/frams/foraminifera/data/scripts/foraminifera.inc

    r493 r496  
    66        colors = ["1.0,1.0,0.0","1.0,0.5,0.0"];
    77        retColors = ["1.0,1.0,1.0", "1.0,0.0,0.0"];
    8         chambers = [ ["0.0,0.0,0.0,",  //coiled
    9         "1.08020961284637, -0.0597195439040661, -0.0393781512975693,",
    10         "1.08020961284637, -0.0597195439040661, -0.0393781512975693,",
    11         "0.615013539791107, 0.778662621974945, 0.535521030426025,",
    12         "0.488581955432892, 0.826426684856415, -0.381044268608093,",
    13         "0.732419908046722, -0.0084995785728097, -1.02214300632477,",
    14         "1.35288727283478, 0.875738024711609, -1.03719782829285,",
    15         "0.342692613601685, 0.938660383224487, -1.45657968521118,",
    16         "1.0958571434021, 0.316927701234818, -1.813929438591,",
    17         "0.903768002986908, 1.11856341362, -2.53161096572876,",
    18         "0.21014116704464, 0.295340299606323, -2.45328187942505,"],
    19         ["0.0,0.0,0.0,", //longitudal
    20         "0.98089325428009, 0.00591040402650833, 0.00389722990803421,",
    21         "1.90962779521942, -0.256769120693207, -0.16194811463356,",
    22         "2.63965249061584, -0.727959632873535, -0.609036147594452,",
    23         "3.17575979232788, -1.34843015670776, -1.14828503131866,",
    24         "3.55273032188416, -2.22369408607483, -1.3917418718338,",
    25         "3.64916682243347, -3.11888360977173, -1.01666414737701,",
    26         "3.50461649894714, -3.84039807319641, -0.377427101135254,",
    27         "3.15921688079834, -4.50001525878906, 0.261153399944305,",
    28         "2.51528453826904, -5.16421365737915, 0.59241509437561,"]];
     8        chambers = [ ["p:sh=1, sx=0.2, sy=0.2, sz=0.2, rz=3.14159265358979,",
     9"p:0.18421219587326, 0.13, sh=1, sx=0.21, sy=0.21, sz=0.21,",
     10"p:0.323935478925705, 0.195192575454712, -0.0246672090142965, sh=1, sx=0.2205, sy=0.2205, sz=0.2205,",
     11"p:0.467822402715683, 0.258204102516174, -0.0246672090142965, sh=1, sx=0.231525, sy=0.231525, sz=0.231525,",
     12"p:0.664101362228394, 0.309014827013016, -0.0246672090142965, sh=1, sx=0.24310125, sy=0.24310125, sz=0.24310125,",
     13"p:0.860512733459473, 0.274790525436401, -0.0246672090142965, sh=1, sx=0.2552563125, sy=0.2552563125, sz=0.2552563125,",
     14"p:1.0273220539093, 0.1655353307724, -0.0246672090142965, sh=1, sx=0.268019128125, sy=0.268019128125, sz=0.268019128125,",
     15"p:1.13825333118439, -0.000509921927005053, -0.0246672090142965, sh=1, sx=0.28142008453125, sy=0.28142008453125, sz=0.28142008453125,",
     16"p:1.17569863796234, -0.196833491325378, -0.0246672090142965, sh=1, sx=0.295491088757813, sy=0.295491088757813, sz=0.295491088757813,",
     17"p:1.13369226455688, -0.392314255237579, -0.0246672090142965, sh=1, sx=0.310265643195703, sy=0.310265643195703, sz=0.310265643195703,"],
     18        ["p:sh=1, sx=0.1, sy=0.1, sz=0.1, rz=3.14159265358979,",
     19"p:0.110527315735817, -0.0167302016913891, sh=1, sx=0.105, sy=0.105, sz=0.105, rx=3.63519277003091e-33,",
     20"p:0.207026958465576, -0.080698736011982, 1.17627548103266e-17, sh=1, sx=0.11025, sy=0.11025, sz=0.11025,",
     21"p:0.271191358566284, -0.169948443770409, 1.17627548103266e-17, sh=1, sx=0.1157625, sy=0.1157625, sz=0.1157625,",
     22"p:0.291628688573837, -0.286643952131271, 1.17627548103266e-17, sh=1, sx=0.121550625, sy=0.121550625, sz=0.121550625,",
     23"p:0.264833927154541, -0.403534322977066, 1.17627548103266e-17, sh=1, sx=0.12762815625, sy=0.12762815625, sz=0.12762815625,",
     24"p:0.194418027997017, -0.500668346881866, 1.17627548103266e-17, sh=1, sx=0.1340095640625, sy=0.1340095640625, sz=0.1340095640625,",
     25"p:0.091719962656498, -0.562735974788666, 1.17627548103266e-17, sh=1, sx=0.140710042265625, sy=0.140710042265625, sz=0.140710042265625,",
     26"p:-0.0270438715815544, -0.57991486787796, 1.17627548103266e-17, sh=1, sx=0.147745544378906, sy=0.147745544378906, sz=0.147745544378906,",
     27"p:-0.143122747540474, -0.549489378929138, 1.17627548103266e-17, sh=1, sx=0.155132821597852, sy=0.155132821597852, sz=0.155132821597852,"]];
    2928}
    3029
     
    3231{
    3332        var rad = getProperty(gen, "chamber_proculus");
    34         var geno = "//0\np:" + chambers[morphotype][0] + "sh=1,sx=" + rad + ",sy=" + rad + ",sz=" + rad + ", rz=3.14159265358979,vr=" + colors[gen];
     33        var geno = "//0\nm:Vstyle=foram\n" + chambers[morphotype][0] + "vr=" + colors[gen];
    3534
    3635        chamber_num = Math.min(chamber_num, chambers[morphotype].size - 1);
     
    3837        for (var i = 0; i < chamber_num; i++)
    3938        {
    40                 rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1);
    41                 geno += "\n" + "p:" + chambers[morphotype][i+1] + "sh=1,sx=" + rad + ",sy=" + rad + ",sz=" + rad + ",vr=" + colors[gen];
     39                //rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1);
     40                geno += "\n" + chambers[morphotype][i+1]  + "vr=" + colors[gen];
    4241        }
    4342
     
    4746        }
    4847
    49         if (morphotype == 0) geno += "\nn:p=0,d=\"S\"";
    50 
     48        //if (morphotype == 0) geno += "\nn:p=0,d=\"S\"";
    5149        return geno;
    5250}
     
    122120        for (var j = 0; j < number; j++)
    123121        {
    124                 createOffspring(createForamMorphology(getGene(parent, "morphotype", 0), gen, 0), energy0, new_genes, parent.data->lifeparams);
     122                createOffspring(createForamMorphology(gen, gen, 0), energy0, new_genes, parent.data->lifeparams);
    125123        }
    126124}
     
    151149                for (var k = 0; k < 2; k++)
    152150                {
    153                         createOffspring(createForamMorphology(getGene(parent, "morphotype", 0), 1 - parent.data->lifeparams->gen, 0), energy0, parent.data->genes[0], parent.data->lifeparams);
     151                        createOffspring(createForamMorphology(1 - parent.data->lifeparams->gen, 1 - parent.data->lifeparams->gen, 0), energy0, parent.data->genes[0], parent.data->lifeparams);
    154152                }
    155153
  • experiments/frams/foraminifera/data/scripts/foraminifera.show

    r493 r496  
    2323        GLDisplay.minfps = 10;
    2424        TrackingCam.cam_h = 15; //more side view
    25         Params = { "foodperiod" : [43200,25920,10800], "feedtrans" : [0.001,0.001,0.001],"energy_nut" :[144.54,544.54,944.54], "stress" : [0,1], "visualize" : [0,1]};
     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]};
    2626        ShowProperties.visualize=1;
    2727}
Note: See TracChangeset for help on using the changeset viewer.