Ignore:
Timestamp:
10/01/21 22:36:10 (3 years ago)
Author:
Maciej Komosinski
Message:

Foraminifera show has now smaller world compared to expdef (and adjusted other parameters), so it is better suited for visualization and demonstration

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

Legend:

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

    r1100 r1152  
    3030global changePeriod;
    3131global phase;
    32 global nutrientSqrCm;
    3332global species_genes;
    3433global max_chambers_def;
     
    3837global nutrient_num_counter;
    3938global wrldsizSquareMeters;
     39const MIN_PART_SIZE = 0.05; //to avoid exceeding the allowed Part.size range when setting radius of body parts
    4040
    4141@include "foraminifera.inc"
     
    8686        World.wrldwat = 200;
    8787        World.wrldsiz = micronsToFrams(100000);
    88         wrldsizSquareMeters = Math.pow(framsToMicrons(World.wrldsiz) * 0.000001, 2);
    8988        World.wrldbnd = 1;
    9089
     
    9594
    9695        //morphology
    97         ExpProperties.zone1_range = micronsToFrams(1000);
     96        ExpProperties.zone1_range = 5; //originally was micronsToFrams(1000); but this was exceeding the allowed Part.size range so was decreased to 5. TODO This change in reticulopodia size may slightly affect simulation and results, so verify/rethink/reimplement if using this expdef in further research.
    9897        ExpProperties.zone2_range = micronsToFrams(3000);
    9998        ExpProperties.chamber_proculus_haplo = micronsToFrams(20);
     
    106105        ExpProperties.nutrientradius = micronsToFrams(10);
    107106        ExpProperties.energy_nut = 200 * energyFromVolume(ExpProperties.nutrientradius, 1);
    108         nutrientSqrCm = 10;
    109         ExpProperties.nutrient_pop = Math.pow(framsToMicrons(World.wrldsiz) * 0.0001, 2) / nutrientSqrCm;
    110107
    111108        ExpState.totaltestedcr = 0;
     
    125122function onExpInit()
    126123{
     124        wrldsizSquareMeters = Math.pow(framsToMicrons(World.wrldsiz) * 0.000001, 2);
    127125        species_genes = [];
    128126        foram_uid = 0;
     
    398396                Populations[2].delete(cr.data->reticulopodiacreature);
    399397        }
    400         var ret = Populations[2].add("//0s\nm:Vstyle=reticulopodia\np:sh=1,sx=0.001,sy=0.001,sz=0.001\np:sh=3,sx=0.01,sy=" + radius + ",sz=" + radius + ",ry=1.57079633,vr=" + curColor + "\nj:0, 1, sh=1");
     398        radius = Math.max(radius, MIN_PART_SIZE);
     399        var ret = Populations[2].add("//0s\nm:Vstyle=reticulopodia\np:sh=1,sx=" + MIN_PART_SIZE + ",sy=" + MIN_PART_SIZE + ",sz=" + MIN_PART_SIZE + "\n" +
     400                "p:sh=3,sx=" + MIN_PART_SIZE + ",sy=" + radius + ",sz=" + radius + ",ry=1.57079633,vr=" + curColor + "\n" +
     401                "j:0, 1, sh=1");
    401402        cr.data->reticulopodiacreature = ret;
    402403        ret.getMechPart(0).orient.set(cr.getMechPart(0).orient);
  • experiments/frams/foraminifera/data/scripts/foraminifera.inc

    r1100 r1152  
    1919                                rgbstring = "0.9,0.9,0.9,i=\"growing=%g\"" % lastchambergrowth; //when the last chamber is growing, make it bright gray and add extra information in its "i" field
    2020                }
     21                effectivesize = Math.max(effectivesize, MIN_PART_SIZE);
    2122                str += "p:sh=1,sx=%g,sy=%g,sz=%g,rz=3.14159265358979,vr=%s\n" % effectivesize % effectivesize % effectivesize % rgbstring;
    2223                if (i > 0)
  • experiments/frams/foraminifera/data/scripts/foraminifera.show

    r847 r1152  
    1818function onLoad()
    1919{
     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;
    2022        var nutrient_multiple = 200;
    21         Params = { "foodflux" : [0.0000000037815, 0.0000000075631, 0.000000015126], "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]};
    22         ShowProperties.visualize = 1;
     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
    2330        ExpProperties.secPerStep = 50;
    24         Simulator.init();
     31
     32        Simulator.init(); //calculates some parameters based on the current world size
    2533        last_simspeed = 0;
    2634        GLDisplay.desiredsimspeed = 50;
Note: See TracChangeset for help on using the changeset viewer.