Index: experiments/frams/foraminifera/data/scripts/foraminifera.expdef
===================================================================
--- experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 493)
+++ experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 496)
@@ -83,5 +83,5 @@
 	//world
 	SignalView.mode = 1;
-	World.wrldwat = 500;
+	World.wrldwat = 200;
 	World.wrldsiz = micronsToFrams(100000);
 	World.wrldbnd = 1;
@@ -220,5 +220,5 @@
 function addForam(species, iter, chambernum, ploid)
 {
-	var geno = createForamMorphology(species_genes[species]->morphotype, ploid, chambernum);
+	var geno = createForamMorphology(ploid, ploid, chambernum);
 	curColor = retColors[ploid];
 	var cr = Populations[0].add(geno);
@@ -367,4 +367,5 @@
 		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);
 		cr.data->reticulopodiacreature = ret;
+		ret.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
 	}
 }
@@ -403,5 +404,5 @@
 	{
 		curColor = retColors[cr.data->lifeparams->gen];
-		var geno = createForamMorphology(getGene(cr, "morphotype", 0), cr.data->lifeparams->gen, chamber_num+1);
+		var geno = createForamMorphology(cr.data->lifeparams->gen, cr.data->lifeparams->gen, chamber_num+1);
 		var cr2 = Populations[0].add(geno);
 
@@ -486,5 +487,5 @@
 function fence(pos, zone)
 {
-	return Math.min(Math.max(0+zone,pos),World.wrldsiz-zone);
+	return Math.min(Math.max(0,pos),World.wrldsiz);
 }
 
@@ -614,8 +615,4 @@
 
 		cr.getMechPart(0).orient.set(o);
-		if (visualization(cr))
-		{
-			cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
-		}
 
 		if (deathConditions(cr) == 1)
@@ -630,4 +627,10 @@
 
 		foramMove(cr);
+
+		if (visualization(cr))
+
+		{
+			cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1));
+		}
 
 		var repro = foramReproduce(cr);
Index: experiments/frams/foraminifera/data/scripts/foraminifera.inc
===================================================================
--- experiments/frams/foraminifera/data/scripts/foraminifera.inc	(revision 493)
+++ experiments/frams/foraminifera/data/scripts/foraminifera.inc	(revision 496)
@@ -6,25 +6,24 @@
 	colors = ["1.0,1.0,0.0","1.0,0.5,0.0"];
 	retColors = ["1.0,1.0,1.0", "1.0,0.0,0.0"];
-	chambers = [ ["0.0,0.0,0.0,",  //coiled
-	"1.08020961284637, -0.0597195439040661, -0.0393781512975693,",
-	"1.08020961284637, -0.0597195439040661, -0.0393781512975693,",
-	"0.615013539791107, 0.778662621974945, 0.535521030426025,",
-	"0.488581955432892, 0.826426684856415, -0.381044268608093,",
-	"0.732419908046722, -0.0084995785728097, -1.02214300632477,",
-	"1.35288727283478, 0.875738024711609, -1.03719782829285,",
-	"0.342692613601685, 0.938660383224487, -1.45657968521118,",
-	"1.0958571434021, 0.316927701234818, -1.813929438591,",
-	"0.903768002986908, 1.11856341362, -2.53161096572876,",
-	"0.21014116704464, 0.295340299606323, -2.45328187942505,"],
-        ["0.0,0.0,0.0,", //longitudal
-	"0.98089325428009, 0.00591040402650833, 0.00389722990803421,",
-	"1.90962779521942, -0.256769120693207, -0.16194811463356,",
-	"2.63965249061584, -0.727959632873535, -0.609036147594452,",
-	"3.17575979232788, -1.34843015670776, -1.14828503131866,",
-	"3.55273032188416, -2.22369408607483, -1.3917418718338,",
-	"3.64916682243347, -3.11888360977173, -1.01666414737701,",
-	"3.50461649894714, -3.84039807319641, -0.377427101135254,",
-	"3.15921688079834, -4.50001525878906, 0.261153399944305,",
-	"2.51528453826904, -5.16421365737915, 0.59241509437561,"]];
+	chambers = [ ["p:sh=1, sx=0.2, sy=0.2, sz=0.2, rz=3.14159265358979,",
+"p:0.18421219587326, 0.13, sh=1, sx=0.21, sy=0.21, sz=0.21,",
+"p:0.323935478925705, 0.195192575454712, -0.0246672090142965, sh=1, sx=0.2205, sy=0.2205, sz=0.2205,",
+"p:0.467822402715683, 0.258204102516174, -0.0246672090142965, sh=1, sx=0.231525, sy=0.231525, sz=0.231525,",
+"p:0.664101362228394, 0.309014827013016, -0.0246672090142965, sh=1, sx=0.24310125, sy=0.24310125, sz=0.24310125,",
+"p:0.860512733459473, 0.274790525436401, -0.0246672090142965, sh=1, sx=0.2552563125, sy=0.2552563125, sz=0.2552563125,",
+"p:1.0273220539093, 0.1655353307724, -0.0246672090142965, sh=1, sx=0.268019128125, sy=0.268019128125, sz=0.268019128125,",
+"p:1.13825333118439, -0.000509921927005053, -0.0246672090142965, sh=1, sx=0.28142008453125, sy=0.28142008453125, sz=0.28142008453125,",
+"p:1.17569863796234, -0.196833491325378, -0.0246672090142965, sh=1, sx=0.295491088757813, sy=0.295491088757813, sz=0.295491088757813,",
+"p:1.13369226455688, -0.392314255237579, -0.0246672090142965, sh=1, sx=0.310265643195703, sy=0.310265643195703, sz=0.310265643195703,"],
+        ["p:sh=1, sx=0.1, sy=0.1, sz=0.1, rz=3.14159265358979,",
+"p:0.110527315735817, -0.0167302016913891, sh=1, sx=0.105, sy=0.105, sz=0.105, rx=3.63519277003091e-33,",
+"p:0.207026958465576, -0.080698736011982, 1.17627548103266e-17, sh=1, sx=0.11025, sy=0.11025, sz=0.11025,",
+"p:0.271191358566284, -0.169948443770409, 1.17627548103266e-17, sh=1, sx=0.1157625, sy=0.1157625, sz=0.1157625,",
+"p:0.291628688573837, -0.286643952131271, 1.17627548103266e-17, sh=1, sx=0.121550625, sy=0.121550625, sz=0.121550625,",
+"p:0.264833927154541, -0.403534322977066, 1.17627548103266e-17, sh=1, sx=0.12762815625, sy=0.12762815625, sz=0.12762815625,",
+"p:0.194418027997017, -0.500668346881866, 1.17627548103266e-17, sh=1, sx=0.1340095640625, sy=0.1340095640625, sz=0.1340095640625,",
+"p:0.091719962656498, -0.562735974788666, 1.17627548103266e-17, sh=1, sx=0.140710042265625, sy=0.140710042265625, sz=0.140710042265625,",
+"p:-0.0270438715815544, -0.57991486787796, 1.17627548103266e-17, sh=1, sx=0.147745544378906, sy=0.147745544378906, sz=0.147745544378906,",
+"p:-0.143122747540474, -0.549489378929138, 1.17627548103266e-17, sh=1, sx=0.155132821597852, sy=0.155132821597852, sz=0.155132821597852,"]];
 }
 
@@ -32,5 +31,5 @@
 {
 	var rad = getProperty(gen, "chamber_proculus"); 
-	var geno = "//0\np:" + chambers[morphotype][0] + "sh=1,sx=" + rad + ",sy=" + rad + ",sz=" + rad + ", rz=3.14159265358979,vr=" + colors[gen];
+	var geno = "//0\nm:Vstyle=foram\n" + chambers[morphotype][0] + "vr=" + colors[gen];
 
 	chamber_num = Math.min(chamber_num, chambers[morphotype].size - 1);
@@ -38,6 +37,6 @@
 	for (var i = 0; i < chamber_num; i++)
 	{
-		rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1);
-		geno += "\n" + "p:" + chambers[morphotype][i+1] + "sh=1,sx=" + rad + ",sy=" + rad + ",sz=" + rad + ",vr=" + colors[gen];
+		//rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1);
+		geno += "\n" + chambers[morphotype][i+1]  + "vr=" +  colors[gen];
 	}
 
@@ -47,6 +46,5 @@
 	}
 
-	if (morphotype == 0) geno += "\nn:p=0,d=\"S\"";
-
+	//if (morphotype == 0) geno += "\nn:p=0,d=\"S\"";
 	return geno;
 }
@@ -122,5 +120,5 @@
 	for (var j = 0; j < number; j++)
 	{
-		createOffspring(createForamMorphology(getGene(parent, "morphotype", 0), gen, 0), energy0, new_genes, parent.data->lifeparams); 
+		createOffspring(createForamMorphology(gen, gen, 0), energy0, new_genes, parent.data->lifeparams); 
 	}
 }
@@ -151,5 +149,5 @@
 		for (var k = 0; k < 2; k++)
 		{
-			createOffspring(createForamMorphology(getGene(parent, "morphotype", 0), 1 - parent.data->lifeparams->gen, 0), energy0, parent.data->genes[0], parent.data->lifeparams); 
+			createOffspring(createForamMorphology(1 - parent.data->lifeparams->gen, 1 - parent.data->lifeparams->gen, 0), energy0, parent.data->genes[0], parent.data->lifeparams); 
 		}
 
Index: experiments/frams/foraminifera/data/scripts/foraminifera.show
===================================================================
--- experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 493)
+++ experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 496)
@@ -23,5 +23,5 @@
 	GLDisplay.minfps = 10;
 	TrackingCam.cam_h = 15; //more side view
-	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]};
+	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]};
 	ShowProperties.visualize=1;
 }
