Changeset 444 for experiments/frams/foraminifera/data
- Timestamp:
- 11/26/15 21:51:13 (9 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r435 r444 64 64 //pop.othermask = 0x10002; 65 65 66 //ExpParams.showRet = 1; //uncomment to show reticulopodia 67 68 pop = Populations.addGroup("Reticulopodia"); 66 pop = Populations.addGroup("ReticulopodiaNutrients"); 69 67 pop.nnsim = 0; 70 68 pop.enableperf = 0; … … 73 71 pop.selfmask = 0x20002; 74 72 pop.othermask = 0x10000; 75 73 76 74 //world 77 75 SignalView.mode = 1; … … 83 81 ExpParams.autorestart = 0; 84 82 83 //ExpParams.visualize = 1; //uncomment to visualize reticulopodia and indicate nutrients positions 84 85 85 //ExpParams.logging = 1; //uncomment to enable logging simulation parameters to log files 86 86 … … 94 94 //morphology 95 95 dir_change = 500; 96 ExpParams.zone1_range = scale( 5000);97 ExpParams.zone2_range = scale( 8000);96 ExpParams.zone1_range = scale(3000); 97 ExpParams.zone2_range = scale(6000); 98 98 init_chambers(); 99 99 ExpParams.chamber_proculus_haplo = scale(50); … … 163 163 Populations[0].clear(); 164 164 Populations[1].clear(); 165 Populations[2].clear(); 165 Populations[2].clear(); //reticulopodia and nutrients 166 166 167 167 for (var i = 0; i < ExpParams.foramPop; i++) … … 253 253 { 254 254 setForamMeta(cr, 1); 255 if (ExpParams. showRet== 1)256 { 257 var ret = Populations[2].add("//0\np:sh=3,sx=0.01,sy="+ExpParams.zone1_range+",sz="+ExpParams.zone1_range+",ry=1.57 ");255 if (ExpParams.visualize == 1) 256 { 257 var ret = Populations[2].add("//0\np:sh=3,sx=0.01,sy="+ExpParams.zone1_range+",sz="+ExpParams.zone1_range+",ry=1.57,vr=0.0,1.0,0.0"); 258 258 cr.user3 = ret; 259 259 } … … 273 273 } 274 274 275 function visualization(cr) 276 { 277 var has_ret = 0; 278 279 if (cr.user3 != null) 280 { 281 if (Populations[2].findUID(cr.user3.uid) != null) 282 { 283 has_ret = 1; 284 } 285 } 286 287 return has_ret; 288 } 289 275 290 function foramGrow(cr, chamber_num) 276 291 { … … 285 300 setForamMeta(cr2, cr2.user2["gen"]); 286 301 287 if ( ExpParams.showRet == 1)302 if (visualization(cr)) 288 303 { 289 304 Populations[2].delete(cr.user3); … … 419 434 { 420 435 cr.getMechPart(0).orient.set(o); 421 if (ExpParams.showRet == 1) 436 if (visualization(cr)) 437 { 422 438 cr.user3.moveAbs(cr.center_x-ExpParams.zone1_range, cr.center_y-ExpParams.zone1_range, cr.center_z-ExpParams.zone1_range-getProperty(cr.user2["gen"], "chamber_proculus")); 439 } 423 440 424 441 if (deathConditions(cr) == 1) … … 456 473 function onForamsDied(cr) 457 474 { 458 if ( ExpParams.showRet == 1)475 if (visualization(cr)) 459 476 { 460 477 Populations[2].delete(cr.user3); … … 474 491 function createNutrientGenotype(nutrientsize, zone1_range) 475 492 { 476 return "//0\np:sh=3,sx="+ (nutrientsize+25)+",sy="+nutrientsize+",sz="+nutrientsize+",ry=1.5,vr=0.0,1.0,0.0";493 return "//0\np:sh=3,sx="+nutrientsize+",sy="+nutrientsize+",sz="+nutrientsize+",ry=1.5,vr=0.0,1.0,0.0"; 477 494 } 478 495 479 496 function onNutrientsStep(cr) 480 497 { 481 cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, -ExpParams.zone1_range+0.5);498 cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, 0.5); 482 499 } 483 500 … … 495 512 496 513 placeCreatureRandomly(cr, 0, 0); 514 if (ExpParams.visualize == 1) 515 { 516 var nutsize = ExpParams.nutrientsize*10; 517 var nut = Populations[2].add("//0\np:sh=2,sx="+nutsize+",sy="+nutsize+",sz="+nutsize+",ry=1.5,vr=0.0,1.0,0.0"); 518 cr.user3 = nut; 519 nut.moveAbs(cr.pos_x-1.5*nutsize, cr.pos_y-1.5*nutsize, 0.5); 520 } 521 } 522 523 function onNutrientsDied(cr) 524 { 525 if (visualization(cr)) 526 { 527 Populations[2].delete(cr.user3); 528 } 497 529 } 498 530 … … 603 635 604 636 prop: 605 id: showRet606 name:Show reticulopodia 637 id:visualize 638 name:Show reticulopodia and nutrients 607 639 type:d 0 1 0 608 640 group:Foraminifera -
experiments/frams/foraminifera/data/scripts/foraminifera.show
r442 r444 4 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 5 6 Nutrients are shown as tall vertical bars. Foraminifers move towards nearest nutrients and this way they can accumulate enough energy to reproduce. 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 After "Enhance visualization" option is enabled reticulopodia are shown as disks and positions of nutrients are indicated by cuboids. 7 9 8 10 More information at www.framsticks.com/foraminifera … … 20 22 TrackingCam.cam_h = 15; //more side view 21 23 22 Params = { "feedrate" : [0.05,0.1,0.2], "feedtrans" : [0.01,0.05,0.1],"energy_nut" :[0.5,1.5,3.0], "stress" : [0,1] };24 Params = { "feedrate" : [0.05,0.1,0.2], "feedtrans" : [0.01,0.05,0.1],"energy_nut" :[0.5,1.5,3.0], "stress" : [0,1], "visualize" : [0,1]}; 23 25 } 24 26 … … 48 50 } 49 51 52 function ShowParams_visualize_set() 53 { 54 setShowParam("visualize"); 55 } 56 50 57 ~ 51 58 … … 69 76 name:Stress 70 77 type:d 0 1 1 78 79 prop: 80 id:visualize 81 name:Enhance visualization 82 type:d 0 1 0
Note: See TracChangeset
for help on using the changeset viewer.