Index: experiments/frams/foraminifera/data/scripts/foraminifera.expdef
===================================================================
--- experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 442)
+++ experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 444)
@@ -64,7 +64,5 @@
 	//pop.othermask = 0x10002;
 
-	//ExpParams.showRet = 1; //uncomment to show reticulopodia
-
-	pop = Populations.addGroup("Reticulopodia");
+	pop = Populations.addGroup("ReticulopodiaNutrients");
 	pop.nnsim = 0;
 	pop.enableperf = 0;
@@ -73,5 +71,5 @@
 	pop.selfmask = 0x20002;
 	pop.othermask = 0x10000;
-	
+
 	//world
 	SignalView.mode = 1;
@@ -83,4 +81,6 @@
 	ExpParams.autorestart = 0;
 
+	//ExpParams.visualize = 1; //uncomment to visualize reticulopodia and indicate nutrients positions
+
 	//ExpParams.logging = 1; //uncomment to enable logging simulation parameters to log files
 
@@ -94,6 +94,6 @@
 	//morphology
 	dir_change = 500;
-	ExpParams.zone1_range = scale(5000);
-	ExpParams.zone2_range = scale(8000);
+	ExpParams.zone1_range = scale(3000);
+	ExpParams.zone2_range = scale(6000);
 	init_chambers();
 	ExpParams.chamber_proculus_haplo = scale(50);
@@ -163,5 +163,5 @@
 	Populations[0].clear();
 	Populations[1].clear();
-	Populations[2].clear();
+	Populations[2].clear(); //reticulopodia and nutrients
 
 	for (var i = 0; i < ExpParams.foramPop; i++)
@@ -253,7 +253,7 @@
 {
 	setForamMeta(cr, 1);
-	if (ExpParams.showRet == 1)
-	{
-		var ret = Populations[2].add("//0\np:sh=3,sx=0.01,sy="+ExpParams.zone1_range+",sz="+ExpParams.zone1_range+",ry=1.57");
+	if (ExpParams.visualize == 1)
+	{
+		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");
 		cr.user3 = ret;
 	}
@@ -273,4 +273,19 @@
 }
 
+function visualization(cr)
+{
+	var has_ret = 0;
+
+	if (cr.user3 != null)
+	{
+		if (Populations[2].findUID(cr.user3.uid) != null)
+		{
+			has_ret = 1;
+		}
+	}
+
+	return has_ret;
+}
+
 function foramGrow(cr, chamber_num)
 {
@@ -285,5 +300,5 @@
 	setForamMeta(cr2, cr2.user2["gen"]);
 
-	if (ExpParams.showRet == 1)
+	if (visualization(cr))
 	{
 		Populations[2].delete(cr.user3);
@@ -419,6 +434,8 @@
 {
 	cr.getMechPart(0).orient.set(o);
-	if (ExpParams.showRet == 1)
+	if (visualization(cr))
+	{
 		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"));
+	}
 
 	if (deathConditions(cr) == 1)
@@ -456,5 +473,5 @@
 function onForamsDied(cr)
 {
-	if (ExpParams.showRet == 1)
+	if (visualization(cr))
 	{
 		Populations[2].delete(cr.user3);
@@ -474,10 +491,10 @@
 function createNutrientGenotype(nutrientsize, zone1_range)
 {
-	return "//0\np:sh=3,sx="+(nutrientsize+25)+",sy="+nutrientsize+",sz="+nutrientsize+",ry=1.5,vr=0.0,1.0,0.0"; 
+	return "//0\np:sh=3,sx="+nutrientsize+",sy="+nutrientsize+",sz="+nutrientsize+",ry=1.5,vr=0.0,1.0,0.0";
 }
 
 function onNutrientsStep(cr)
 {
-	cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, -ExpParams.zone1_range+0.5);
+	cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, 0.5);
 }
 
@@ -495,4 +512,19 @@
 
 	placeCreatureRandomly(cr, 0, 0);
+	if (ExpParams.visualize == 1)
+	{
+		var nutsize = ExpParams.nutrientsize*10;
+		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");
+		cr.user3 = nut;
+		nut.moveAbs(cr.pos_x-1.5*nutsize, cr.pos_y-1.5*nutsize, 0.5);
+	}
+}
+
+function onNutrientsDied(cr)
+{
+	if (visualization(cr))
+	{
+		Populations[2].delete(cr.user3);
+	}
 }
 
@@ -603,6 +635,6 @@
 
 prop:
-id:showRet
-name:Show reticulopodia
+id:visualize
+name:Show reticulopodia and nutrients
 type:d 0 1 0
 group:Foraminifera
Index: experiments/frams/foraminifera/data/scripts/foraminifera.show
===================================================================
--- experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 442)
+++ experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 444)
@@ -4,5 +4,7 @@
 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. 
 
-Nutrients are shown as tall vertical bars. Foraminifers move towards nearest nutrients and this way they can accumulate enough energy to reproduce.
+Nutrients are shown as tiny green cylinders. Foraminifers move towards nearest nutrients and this way they can accumulate enough energy to reproduce.
+
+After "Enhance visualization" option is enabled reticulopodia are shown as disks and positions of nutrients are indicated by cuboids.  
 
 More information at www.framsticks.com/foraminifera
@@ -20,5 +22,5 @@
 	TrackingCam.cam_h = 15; //more side view
 
-	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]};
+	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]};
 }
 
@@ -48,4 +50,9 @@
 }
 
+function ShowParams_visualize_set()
+{
+	setShowParam("visualize");
+}
+
 ~
 
@@ -69,2 +76,7 @@
 name:Stress 
 type:d 0 1 1
+
+prop:
+id:visualize
+name:Enhance visualization
+type:d 0 1 0
