Before executing any of the code below, create a new folder and place into it all the relevant text files from 
        http://depts.washington.edu/kerrpost/Public/RifRampCode
Write the full path in the assignment below and execute it:

wd="C:[Write full path here]";

Basic Landscape Slice Function (3D)

LandscapeSlice[{base00x_,base00y_,base00z_},{radius_,height_},{opacity00_,opacity10_,opacity01_,opacity11_},{highlight00_,highlight10_,highlight01_,highlight11_},{edge0010_,edge0001_,edge1011_,edge0111_},{opacity0010_,opacity0001_,opacity1011_,opacity0111_},{highlight0010_,highlight0001_,highlight1011_,highlight0111_},{highlightOpac_,highlightEpi_},{arrowlength_,arrowdelta_,inc_},{vx_,vy_,vz_},{linewd_}]:=
Graphics3D[{
If[highlight00,{{Black,Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{Black,Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]}],

If[highlight10,{{CMYKColor[0.8837,.7692,0,0],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{CMYKColor[0.8837,.7692,0,0],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]}],

{If[highlight0010,Yellow,White],Opacity[opacity0010],EdgeForm[{Opacity[opacity0010],Thickness[linewd]}],Polygon[{{base00x+radius,base00y,base00z},{base00x+radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z}}]},
Table[{EdgeForm[Opacity[opacity0010]],
If[((i-edge0010*arrowlength)<base00x+radius) && (i<base00x+radius),Line[{},{}],
If[((i-edge0010*arrowlength)>base00x+1-radius) && (i>base00x+1-radius),Line[{},{}],
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (base00x+radius≤i≤base00x+1-radius),{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i-edge0010*arrowlength,base00y,base00z+height}}]},
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (i<base00x+radius),
{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]},
If[(base00x+radius≤ (i-edge0010*arrowlength)≤ base00x+1-radius) && (i>base00x+1-radius),{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength<base00x+radius),{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength>base00x+1-radius),{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},
If[((i-edge0010*arrowlength)<base00x+radius) && (i>base00x+1-radius),{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},
{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]}
]
]
]
]
]
]
]
]}
,{i,base00x+radius-arrowlength+If[edge0010>0,inc,If[edge0010<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}],

If[highlight01,{{CMYKColor[0.8631,.1957,1,.0771],Opacity[opacity01],EdgeForm[{Opacity[opacity01],Thickness[linewd]}],Cylinder[{{base00x,base00y+1,base00z},{base00x,base00y+1,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x,base00y+1,base00z},{base00x,base00y+1,base00z+height+highlightEpi}},radius+highlightEpi]}},{CMYKColor[0.8631,.1957,1,.0771],Opacity[opacity01],EdgeForm[{Opacity[opacity01],Thickness[linewd]}],Cylinder[{{base00x,base00y+1,base00z},{base00x,base00y+1,base00z+height}},radius]}],

{If[highlight0001,Yellow,White],Opacity[opacity0001],EdgeForm[{Opacity[opacity0001],Thickness[linewd]}],Polygon[{{base00x,base00y+radius,base00z},{base00x,base00y+radius,base00z+height},{base00x,base00y+1-radius,base00z+height},{base00x,base00y+1-radius,base00z}}]},
Table[{EdgeForm[{Opacity[opacity0001],Thickness[linewd]}],
If[((i-edge0001*arrowlength)<base00y+radius) && (i<base00y+radius),Line[{},{}],
If[((i-edge0001*arrowlength)>base00y+1-radius) && (i>base00y+1-radius),Line[{},{}],
If[(base00y+radius≤(i-edge0001*arrowlength)≤base00y+1-radius) && (base00y+radius≤i≤base00y+1-radius),{Thickness[linewd],Line[{{base00x,i-edge0001*arrowlength,base00z},{base00x,i,base00z+(height/2)},{base00x,i-edge0001*arrowlength,base00z+height}}]},
If[(base00y+radius≤(i-edge0001*arrowlength)≤base00y+1-radius) && (i<base00y+radius),
{Thickness[linewd],Line[{{base00x,i-edge0001*arrowlength,base00z},{base00x,base00y+radius,base00z+(-(height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,base00y+radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,i-edge0001*arrowlength,base00z+height}}]},
If[(base00y+radius≤ (i-edge0001*arrowlength)≤ base00y+1-radius) && (i>base00y+1-radius),{Thickness[linewd],Line[{{base00x,i-edge0001*arrowlength,base00z},{base00x,base00y+1-radius,base00z+((height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,base00y+1-radius,base00z+height-((height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,i-edge0001*arrowlength,base00z+height}}]},
If[(base00y+radius≤ i≤ base00y+1-radius) && (i-edge0001*arrowlength<base00y+radius),{Thickness[linewd],Line[{{base00x,base00y+radius,base00z+((height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,i,base00z+(height/2)},{base00x,base00y+radius,base00z+height-((height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))}}]},
If[(base00y+radius≤ i≤ base00y+1-radius) && (i-edge0001*arrowlength>base00y+1-radius),{Thickness[linewd],Line[{{base00x,base00y+1-radius,base00z+(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,i,base00z+(height/2)},{base00x,base00y+1-radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))}}]},
If[((i-edge0001*arrowlength)<base00y+radius) && (i>base00y+1-radius),{Thickness[linewd],Line[{{base00x,base00y+radius,base00z+((height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,base00y+1-radius,base00z+((height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,base00y+1-radius,base00z+height-((height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,base00y+radius,base00z+height-((height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))}}]},
{Thickness[linewd],Line[{{base00x,base00y+1-radius,base00z+(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))},{base00x,base00y+radius,base00z+(-(height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,base00y+radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+radius-(i-edge0001*arrowlength))},{base00x,base00y+1-radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge0001*arrowlength))}}]}
]
]
]
]
]
]
]
]}
,{i,base00y+radius-arrowlength+If[edge0001>0,inc,If[edge0001<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}],

If[highlight11,{{CMYKColor[0,.994,1,0],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x+1,base00y+1,base00z},{base00x+1,base00y+1,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x+1,base00y+1,base00z},{base00x+1,base00y+1,base00z+height+highlightEpi}},radius+highlightEpi]}},{CMYKColor[0,.994,1,0],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x+1,base00y+1,base00z},{base00x+1,base00y+1,base00z+height}},radius]}],

{If[highlight1011,Yellow,White],Opacity[opacity1011],EdgeForm[{Opacity[opacity1011],Thickness[linewd]}],Polygon[{{base00x+1,base00y+radius,base00z},{base00x+1,base00y+radius,base00z+height},{base00x+1,base00y+1-radius,base00z+height},{base00x+1,base00y+1-radius,base00z}}]},
Table[{EdgeForm[{Opacity[opacity1011],Thickness[linewd]}],
If[((i-edge1011*arrowlength)<base00y+radius) && (i<base00y+radius),Line[{},{}],
If[((i-edge1011*arrowlength)>base00y+1-radius) && (i>base00y+1-radius),Line[{},{}],
If[(base00y+radius≤(i-edge1011*arrowlength)≤base00y+1-radius) && (base00y+radius≤i≤base00y+1-radius),{Thickness[linewd],Line[{{base00x+1,i-edge1011*arrowlength,base00z},{base00x+1,i,base00z+(height/2)},{base00x+1,i-edge1011*arrowlength,base00z+height}}]},
If[(base00y+radius≤(i-edge1011*arrowlength)≤base00y+1-radius) && (i<base00y+radius),
{Thickness[linewd],Line[{{base00x+1,i-edge1011*arrowlength,base00z},{base00x+1,base00y+radius,base00z+(-(height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,base00y+radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,i-edge1011*arrowlength,base00z+height}}]},
If[(base00y+radius≤ (i-edge1011*arrowlength)≤ base00y+1-radius) && (i>base00y+1-radius),{Thickness[linewd],Line[{{base00x+1,i-edge1011*arrowlength,base00z},{base00x+1,base00y+1-radius,base00z+((height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,base00y+1-radius,base00z+height-((height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,i-edge1011*arrowlength,base00z+height}}]},
If[(base00y+radius≤ i≤ base00y+1-radius) && (i-edge1011*arrowlength<base00y+radius),{Thickness[linewd],Line[{{base00x+1,base00y+radius,base00z+((height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,i,base00z+(height/2)},{base00x+1,base00y+radius,base00z+height-((height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))}}]},
If[(base00y+radius≤ i≤ base00y+1-radius) && (i-edge1011*arrowlength>base00y+1-radius),{Thickness[linewd],Line[{{base00x+1,base00y+1-radius,base00z+(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,i,base00z+(height/2)},{base00x+1,base00y+1-radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))}}]},
If[((i-edge1011*arrowlength)<base00y+radius) && (i>base00y+1-radius),{Thickness[linewd],Line[{{base00x+1,base00y+radius,base00z+((height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,base00y+1-radius,base00z+((height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,base00y+1-radius,base00z+height-((height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,base00y+radius,base00z+height-((height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))}}]},
{Thickness[linewd],Line[{{base00x+1,base00y+1-radius,base00z+(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))},{base00x+1,base00y+radius,base00z+(-(height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,base00y+radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+radius-(i-edge1011*arrowlength))},{base00x+1,base00y+1-radius,base00z+height-(-(height/(2*arrowlength)))*(base00y+1-radius-(i-edge1011*arrowlength))}}]}
]
]
]
]
]
]
]
]}
,{i,base00y+radius-arrowlength+If[edge1011>0,inc,If[edge1011<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}],
{If[highlight0111,Yellow,White],Opacity[opacity0111],EdgeForm[{Opacity[opacity0111],Thickness[linewd]}],Polygon[{{base00x+radius,base00y+1,base00z},{base00x+radius,base00y+1,base00z+height},{base00x+1-radius,base00y+1,base00z+height},{base00x+1-radius,base00y+1,base00z}}]},
Table[{EdgeForm[{Opacity[opacity0111],Thickness[linewd]}],
If[((i-edge0111*arrowlength)<base00x+radius) && (i<base00x+radius),Line[{},{}],
If[((i-edge0111*arrowlength)>base00x+1-radius) && (i>base00x+1-radius),Line[{},{}],
If[(base00x+radius≤(i-edge0111*arrowlength)≤base00x+1-radius) && (base00x+radius≤i≤base00x+1-radius),{Thickness[linewd],Line[{{i-edge0111*arrowlength,base00y+1,base00z},{i,base00y+1,base00z+(height/2)},{i-edge0111*arrowlength,base00y+1,base00z+height}}]},
If[(base00x+radius≤(i-edge0111*arrowlength)≤base00x+1-radius) && (i<base00x+radius),
{Thickness[linewd],Line[{{i-edge0111*arrowlength,base00y+1,base00z},{base00x+radius,base00y+1,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{base00x+radius,base00y+1,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{i-edge0111*arrowlength,base00y+1,base00z+height}}]},
If[(base00x+radius≤ (i-edge0111*arrowlength)≤ base00x+1-radius) && (i>base00x+1-radius),{Thickness[linewd],Line[{{i-edge0111*arrowlength,base00y+1,base00z},{base00x+1-radius,base00y+1,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{base00x+1-radius,base00y+1,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{i-edge0111*arrowlength,base00y+1,base00z+height}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0111*arrowlength<base00x+radius),{Thickness[linewd],Line[{{base00x+radius,base00y+1,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{i,base00y+1,base00z+(height/2)},{base00x+radius,base00y+1,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0111*arrowlength>base00x+1-radius),{Thickness[linewd],Line[{{base00x+1-radius,base00y+1,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{i,base00y+1,base00z+(height/2)},{base00x+1-radius,base00y+1,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))}}]},
If[((i-edge0111*arrowlength)<base00x+radius) && (i>base00x+1-radius),{Thickness[linewd],Line[{{base00x+radius,base00y+1,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{base00x+1-radius,base00y+1,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{base00x+1-radius,base00y+1,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{base00x+radius,base00y+1,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))}}]},
{Thickness[linewd],Line[{{base00x+1-radius,base00y+1,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))},{base00x+radius,base00y+1,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{base00x+radius,base00y+1,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0111*arrowlength))},{base00x+1-radius,base00y+1,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0111*arrowlength))}}]}
]
]
]
]
]
]
]
]}
,{i,base00x+radius-arrowlength+If[edge0111>0,inc,If[edge0111<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}]
},Boxed->False,ViewVector->{vx,vy,vz},Lighting->{{"Ambient",White}},ImageSize->500]

Figure 3b Slices

LandscapeSlice[{0,0,0},{.1,.25},{1,1,1,1},{False,False,False,False},{-1,-1,-1,-1},{1,1,1,1},{False,False,False,False},{.65,.01},{.5*(.8/7),2*(.8/7),0},{1.9,1.5,1.1},{.002}]

Export["Slice3_X.tiff",LandscapeSlice[{0,0,0},{.1,.25},{1,1,1,1},{False,False,False,False},{-1,-1,-1,-1},{1,1,1,1},{False,False,False,False},{.65,.01},{.5*(.8/7),2*(.8/7),0},{1.9,1.5,1.1},{0.002}],ImageResolution->500]

Export["Slice3_Y.tiff",LandscapeSlice[{0,0,0},{.1,.25},{1,1,1,1},{False,False,False,False},{1,1,-1,-1},{1,1,1,1},{False,False,False,False},{.65,.01},{.5*(.8/7),2*(.8/7),0},{1.9,1.5,1.1},{0.002}],ImageResolution->500]

Export["Slice3_Z.tiff",LandscapeSlice[{0,0,0},{.1,.25},{1,1,1,1},{False,False,False,False},{-1,-1,1,1},{1,1,1,1},{False,False,False,False},{.65,.01},{.5*(.8/7),2*(.8/7),0},{1.9,1.5,1.1},{0.002}],ImageResolution->500]

Landscape Slice Function (2D version)

LandscapeSlice2D[{base00x_,base00y_,base00z_},{radius_,height_,nslicesbelow_},{opacity00_,opacity10_,opacity01_,opacity11_},{highlight00_,highlight10_,highlight01_,highlight11_},{viab00_,viab10_,viab01_,viab11_},{edge0010_,edge0001_,edge1011_,edge0111_},{opacity0010_,opacity0001_,opacity1011_,opacity0111_},{highlight0010_,highlight0001_,highlight1011_,highlight0111_},{viab0010_,viab0001_,viab1011_,viab0111_},{highlightOpac_,highlightEpi_},{arrowlength_,arrowdelta_,inc_},{vx_,vy_,vz_},{linewd_}]:=
Graphics3D[{
If[highlight00,{{If[viab00,Black,LightGray],Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab00,Black,LightGray],Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]}],

If[highlight10,{{If[viab10,CMYKColor[0.8631,.1957,1,.0771],LightGray],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab10,CMYKColor[0.8631,.1957,1,.0771],LightGray],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]}],

{If[highlight0010,Yellow,If[viab0010,White,LightGray]],Opacity[opacity0010],EdgeForm[{Opacity[opacity0010],Thickness[linewd]}],Polygon[{{base00x+radius,base00y,base00z},{base00x+radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z}}]},

If[edge0010==0,{},
Table[{EdgeForm[Opacity[opacity0010]],
If[((i-edge0010*arrowlength)<base00x+radius) && (i<base00x+radius),Line[{},{}],
If[((i-edge0010*arrowlength)>base00x+1-radius) && (i>base00x+1-radius),Line[{},{}],
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (base00x+radius≤i≤base00x+1-radius),{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i-edge0010*arrowlength,base00y,base00z+height}}]},
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (i<base00x+radius),
{{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]}},
If[(base00x+radius≤ (i-edge0010*arrowlength)≤ base00x+1-radius) && (i>base00x+1-radius),{{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]}},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength<base00x+radius),{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength>base00x+1-radius),{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},
If[((i-edge0010*arrowlength)<base00x+radius) && (i>base00x+1-radius),{{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]}},

{{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]}}
]
]
]
]
]
]
]
]}
,{i,base00x+radius-arrowlength+If[edge0010>0,inc,If[edge0010<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}]],

If[highlight01,{{If[viab01,CMYKColor[0.8837,.7692,0,0],LightGray],Opacity[opacity01],EdgeForm[{Opacity[opacity01],Thickness[linewd]}],Cylinder[{{base00x-1,base00y,base00z},{base00x-1,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x-1,base00y,base00z},{base00x-1,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab01,CMYKColor[0.8837,.7692,0,0],LightGray],Opacity[opacity01],EdgeForm[{Opacity[opacity01],Thickness[linewd]}],Cylinder[{{base00x-1,base00y,base00z},{base00x-1,base00y,base00z+height}},radius]}],
{If[highlight0001,Yellow,If[viab0001,White,LightGray]],Opacity[opacity0001],EdgeForm[{Opacity[opacity0001],Thickness[linewd]}],Polygon[{{base00x-radius,base00y,base00z},{base00x-radius,base00y,base00z+height},{base00x-1+radius,base00y,base00z+height},{base00x-1+radius,base00y,base00z}}]},

If[edge0001==0,{},
Table[{EdgeForm[Opacity[opacity0001]],
If[((i+edge0001*arrowlength)<base00x-1+radius) && (i<base00x-1+radius),Line[{},{}],
If[((i+edge0001*arrowlength)>base00x-radius) && (i>base00x-radius),Line[{},{}],
If[(base00x-1+radius≤(i+edge0001*arrowlength)≤base00x-radius) && (base00x-1+radius≤i≤base00x-radius),{Thickness[linewd],Line[{{i+edge0001*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i+edge0001*arrowlength,base00y,base00z+height}}]},
If[(base00x-1+radius≤(i+edge0001*arrowlength)≤base00x-radius) && (i<base00x-1+radius),
{{Thickness[linewd],Line[{{i+edge0001*arrowlength,base00y,base00z},{base00x-1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))},{i+edge0001*arrowlength,base00y,base00z+height}}]}},
If[(base00x-1+radius≤ (i+edge0001*arrowlength)≤ base00x-radius) && (i>base00x-radius),{{Thickness[linewd],Line[{{i+edge0001*arrowlength,base00y,base00z},{base00x-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))},{i+edge0001*arrowlength,base00y,base00z+height}}]}},
If[(base00x-1+radius≤ i≤ base00x-radius) && (i+edge0001*arrowlength<base00x-1+radius),{Thickness[linewd],Line[{{base00x-1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))},{i,base00y,base00z+(height/2)},{base00x-1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))}}]},
If[(base00x-1+radius≤ i≤ base00x-radius) && (i+edge0001*arrowlength>base00x-radius),{Thickness[linewd],Line[{{base00x-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))},{i,base00y,base00z+(height/2)},{base00x-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))}}]},
If[((i+edge0001*arrowlength)<base00x-1+radius) && (i>base00x-radius),{{Thickness[linewd],Line[{{base00x-1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))},{base00x-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))},{base00x-1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))}}]}},
{{Thickness[linewd],Line[{{base00x-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))},{base00x-1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1+radius-(i+edge0001*arrowlength))},{base00x-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-radius-(i+edge0001*arrowlength))}}]}}
]
]
]
]
]
]
]
]}
,{i,base00x-1+radius-arrowlength+If[-edge0001>0,inc,If[-edge0001<0,-inc,0]],base00x-radius+arrowlength,arrowdelta}]],

If[highlight11,{{If[viab11,CMYKColor[0,.994,1,0],LightGray],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x+2,base00y,base00z},{base00x+2,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x+2,base00y,base00z},{base00x+2,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab11,CMYKColor[0,.994,1,0],LightGray],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x+2,base00y,base00z},{base00x+2,base00y,base00z+height}},radius]}],

{If[highlight1011,Yellow,If[viab1011,White,LightGray]],Opacity[opacity1011],EdgeForm[{Opacity[opacity1011],Thickness[linewd]}],Polygon[{{base00x+1+radius,base00y,base00z},{base00x+1+radius,base00y,base00z+height},{base00x+2-radius,base00y,base00z+height},{base00x+2-radius,base00y,base00z}}]},

If[edge1011==0,{},
Table[{EdgeForm[Opacity[opacity1011]],
If[((i-edge1011*arrowlength)<base00x+1+radius) && (i<base00x+1+radius),Line[{},{}],
If[((i-edge1011*arrowlength)>base00x+1+1-radius) && (i>base00x+1+1-radius),Line[{},{}],
If[(base00x+1+radius≤(i-edge1011*arrowlength)≤base00x+1+1-radius) && (base00x+1+radius≤i≤base00x+1+1-radius),{Thickness[linewd],Line[{{i-edge1011*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i-edge1011*arrowlength,base00y,base00z+height}}]},
If[(base00x+1+radius≤(i-edge1011*arrowlength)≤base00x+1+1-radius) && (i<base00x+1+radius),
{{Thickness[linewd],Line[{{i-edge1011*arrowlength,base00y,base00z},{base00x+1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))},{i-edge1011*arrowlength,base00y,base00z+height}}]}},
If[(base00x+1+radius≤ (i-edge1011*arrowlength)≤ base00x+1+1-radius) && (i>base00x+1+1-radius),{{Thickness[linewd],Line[{{i-edge1011*arrowlength,base00y,base00z},{base00x+1+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))},{i-edge1011*arrowlength,base00y,base00z+height}}]}},
If[(base00x+1+radius≤ i≤ base00x+1+1-radius) && (i-edge1011*arrowlength<base00x+1+radius),{Thickness[linewd],Line[{{base00x+1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))}}]},
If[(base00x+1+radius≤ i≤ base00x+1+1-radius) && (i-edge1011*arrowlength>base00x+1+1-radius),{Thickness[linewd],Line[{{base00x+1+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+1+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))}}]},
If[((i-edge1011*arrowlength)<base00x+1+radius) && (i>base00x+1+1-radius),{{Thickness[linewd],Line[{{base00x+1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))},{base00x+1+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))},{base00x+1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))}}]}},

{{Thickness[linewd],Line[{{base00x+1+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))},{base00x+1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1+radius-(i-edge1011*arrowlength))},{base00x+1+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1+1-radius-(i-edge1011*arrowlength))}}]}}
]
]
]
]
]
]
]
]}
,{i,base00x+1+radius-arrowlength+If[edge1011>0,inc,If[edge1011<0,-inc,0]],base00x+1+1-radius+arrowlength,arrowdelta}]],

If[highlight11,{{If[viab11,CMYKColor[0,.994,1,0],LightGray],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x-2,base00y,base00z},{base00x-2,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x-2,base00y,base00z},{base00x-2,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab11,CMYKColor[0,.994,1,0],LightGray],Opacity[opacity11],EdgeForm[{Opacity[opacity11],Thickness[linewd]}],Cylinder[{{base00x-2,base00y,base00z},{base00x-2,base00y,base00z+height}},radius]}],
{If[highlight0111,Yellow,If[viab0111,White,LightGray]],Opacity[opacity0111],EdgeForm[{Opacity[opacity0111],Thickness[linewd]}],Polygon[{{base00x-1-radius,base00y,base00z},{base00x-1-radius,base00y,base00z+height},{base00x-2+radius,base00y,base00z+height},{base00x-2+radius,base00y,base00z}}]},
If[edge0111==0,{},
Table[{EdgeForm[Opacity[opacity0111]],
If[((i+edge0111*arrowlength)<base00x-1-1+radius) && (i<base00x-1-1+radius),Line[{},{}],
If[((i+edge0111*arrowlength)>base00x-1-radius) && (i>base00x-1-radius),Line[{},{}],
If[(base00x-1-1+radius≤(i+edge0111*arrowlength)≤base00x-1-radius) && (base00x-1-1+radius≤i≤base00x-1-radius),{Thickness[linewd],Line[{{i+edge0111*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i+edge0111*arrowlength,base00y,base00z+height}}]},
If[(base00x-1-1+radius≤(i+edge0111*arrowlength)≤base00x-1-radius) && (i<base00x-1-1+radius),
{{Thickness[linewd],Line[{{i+edge0111*arrowlength,base00y,base00z},{base00x-1-1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1-1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))},{i+edge0111*arrowlength,base00y,base00z+height}}]}},
If[(base00x-1-1+radius≤ (i+edge0111*arrowlength)≤ base00x-1-radius) && (i>base00x-1-radius),{{Thickness[linewd],Line[{{i+edge0111*arrowlength,base00y,base00z},{base00x-1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))},{i+edge0111*arrowlength,base00y,base00z+height}}]}},
If[(base00x-1-1+radius≤ i≤ base00x-1-radius) && (i+edge0111*arrowlength<base00x-1-1+radius),{Thickness[linewd],Line[{{base00x-1-1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))},{i,base00y,base00z+(height/2)},{base00x-1-1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))}}]},
If[(base00x-1-1+radius≤ i≤ base00x-1-radius) && (i+edge0111*arrowlength>base00x-1-radius),{Thickness[linewd],Line[{{base00x-1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))},{i,base00y,base00z+(height/2)},{base00x-1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))}}]},
If[((i+edge0111*arrowlength)<base00x-1-1+radius) && (i>base00x-1-radius),{{Thickness[linewd],Line[{{base00x-1-1+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))},{base00x-1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))},{base00x-1-1+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))}}]}},
{{Thickness[linewd],Line[{{base00x-1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))},{base00x-1-1+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))}}]},{Thickness[linewd],Line[{{base00x-1-1+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1-1+radius-(i+edge0111*arrowlength))},{base00x-1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x-1-radius-(i+edge0111*arrowlength))}}]}}
]
]
]
]
]
]
]
]}
,{i,base00x-1-1+radius-arrowlength+If[-edge0111>0,inc,If[-edge0111<0,-inc,0]],base00x-1-radius+arrowlength,arrowdelta}]]},Boxed->False,ViewVector->{vx,vy,vz},Lighting->{{"Ambient",White}},PlotRange->{{base00x-2,base00x+2},{base00y-radius-2*highlightEpi,base00y+radius+2*highlightEpi},{base00z-highlightEpi-nslicesbelow*height,base00z+height+highlightEpi}},ImageSize->1000];

Figure 3d Landscape “Wall”

X=LandscapeSlice2D[{0,0,0.5},{.1,.25,2},{1,1,1,1},{True,False,False,False},{True,True,True,True},{-1,-1,-1,-1},{1,1,1,1},{False,False,False,False},{True,True,True,True},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-3.5,2.1},{.002}];
Y=LandscapeSlice2D[{0,0,0.25},{.1,.25,0},{1,1,1,1},{True,True,True,False},{True,True,True,True},{1,1,-1,-1},{1,1,1,1},{True,True,False,False},{True,True,True,True},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-3.5,2.1},{.002}];
Z=LandscapeSlice2D[{0,0,0},{.1,.25,0},{1,1,1,1},{False,True,True,True},{True,True,True,True},{-1,-1,1,1},{1,1,1,1},{False,False,True,True},{True,True,True,True},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-3.5,2.1},{.002}];
Show[X,Y,Z]

Export["Slices.tiff",Show[X,Y,Z],ImageResolution->500]

Figures 4b [GRADUAL 13]

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV13.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV13.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir13.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh13.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh13.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1,1,1},{GenoHigh[[i]][[1]]==1,GenoHigh[[i]][[2]]==1,GenoHigh[[i]][[3]]==1,GenoHigh[[i]][[4]]==1},{PV[[1]][[i]]==1,PV[[2]][[i]]==1,PV[[3]][[i]]==1,PV[[4]][[i]]==1},{EdgeDir[[1]][[i]],EdgeDir[[2]][[i]],EdgeDir[[3]][[i]],EdgeDir[[4]][[i]]},{1,1,1,1},{EdgeHigh[[i]][[1]]==1,EdgeHigh[[i]][[2]]==1,EdgeHigh[[i]][[3]]==1,EdgeHigh[[i]][[4]]==1},{EdgeV[[1]][[i]]==1,EdgeV[[2]][[i]]==1,EdgeV[[3]][[i]]==1,EdgeV[[4]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
G13Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["G13Wall2.tiff",G13Wall,ImageResolution->500];

Figures 4d [GRADUAL 18]

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV18.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV18.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir18.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh18.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh18.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1,1,1},{GenoHigh[[i]][[1]]==1,GenoHigh[[i]][[2]]==1,GenoHigh[[i]][[3]]==1,GenoHigh[[i]][[4]]==1},{PV[[1]][[i]]==1,PV[[2]][[i]]==1,PV[[3]][[i]]==1,PV[[4]][[i]]==1},{EdgeDir[[1]][[i]],EdgeDir[[2]][[i]],EdgeDir[[3]][[i]],EdgeDir[[4]][[i]]},{1,1,1,1},{EdgeHigh[[i]][[1]]==1,EdgeHigh[[i]][[2]]==1,EdgeHigh[[i]][[3]]==1,EdgeHigh[[i]][[4]]==1},{EdgeV[[1]][[i]]==1,EdgeV[[2]][[i]]==1,EdgeV[[3]][[i]]==1,EdgeV[[4]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
G18Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["G18Wall.tiff",G18Wall,ImageResolution->500];

Supplementary Figures 3b [MODERATE 358]

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV358.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV358.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir358.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh358.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh358.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1,1,1},{GenoHigh[[i]][[1]]==1,GenoHigh[[i]][[2]]==1,GenoHigh[[i]][[3]]==1,GenoHigh[[i]][[4]]==1},{PV[[1]][[i]]==1,PV[[2]][[i]]==1,PV[[3]][[i]]==1,PV[[4]][[i]]==1},{EdgeDir[[1]][[i]],EdgeDir[[2]][[i]],EdgeDir[[3]][[i]],EdgeDir[[4]][[i]]},{1,1,1,1},{EdgeHigh[[i]][[1]]==1,EdgeHigh[[i]][[2]]==1,EdgeHigh[[i]][[3]]==1,EdgeHigh[[i]][[4]]==1},{EdgeV[[1]][[i]]==1,EdgeV[[2]][[i]]==1,EdgeV[[3]][[i]]==1,EdgeV[[4]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
G358Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["G358Wall2.tiff",G358Wall,ImageResolution->500];

Supplementary Figures 3d [MODERATE 367]

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV367.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV367.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir367.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh367.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh367.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1,1,1},{GenoHigh[[i]][[1]]==1,GenoHigh[[i]][[2]]==1,GenoHigh[[i]][[3]]==1,GenoHigh[[i]][[4]]==1},{PV[[1]][[i]]==1,PV[[2]][[i]]==1,PV[[3]][[i]]==1,PV[[4]][[i]]==1},{EdgeDir[[1]][[i]],EdgeDir[[2]][[i]],EdgeDir[[3]][[i]],EdgeDir[[4]][[i]]},{1,1,1,1},{EdgeHigh[[i]][[1]]==1,EdgeHigh[[i]][[2]]==1,EdgeHigh[[i]][[3]]==1,EdgeHigh[[i]][[4]]==1},{EdgeV[[1]][[i]]==1,EdgeV[[2]][[i]]==1,EdgeV[[3]][[i]]==1,EdgeV[[4]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
G367Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["G367Wall2.tiff",G367Wall,ImageResolution->500];

Landscape Slice Function (2D version) For Two Genotypes (SUDDEN RECONSTRUCTIONS)

LandscapeSlice2D2G[{base00x_,base00y_,base00z_},{radius_,height_,nslicesbelow_},{opacity00_,opacity10_},{highlight00_,highlight10_},{viab00_,viab10_},{edge0010_},{opacity0010_},{highlight0010_},{viab0010_},{highlightOpac_,highlightEpi_},{arrowlength_,arrowdelta_,inc_},{vx_,vy_,vz_},{linewd_}]:=
Graphics3D[{
If[highlight00,{{If[viab00,Black,LightGray],Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab00,Black,LightGray],Opacity[opacity00],EdgeForm[{Opacity[opacity00],Thickness[linewd]}],Cylinder[{{base00x,base00y,base00z},{base00x,base00y,base00z+height}},radius]}],

If[highlight10,{{If[viab10,CMYKColor[0.8631,.1957,1,.0771],LightGray],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]},{Yellow,Opacity[highlightOpac],EdgeForm[],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height+highlightEpi}},radius+highlightEpi]}},{If[viab10,CMYKColor[0.8631,.1957,1,.0771],LightGray],Opacity[opacity10],EdgeForm[{Opacity[opacity10],Thickness[linewd]}],Cylinder[{{base00x+1,base00y,base00z},{base00x+1,base00y,base00z+height}},radius]}],

{If[highlight0010,Yellow,If[viab0010,White,LightGray]],Opacity[opacity0010],EdgeForm[{Opacity[opacity0010],Thickness[linewd]}],Polygon[{{base00x+radius,base00y,base00z},{base00x+radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z+height},{base00x+1-radius,base00y,base00z}}]},

If[edge0010==0,{},
Table[{EdgeForm[Opacity[opacity0010]],
If[((i-edge0010*arrowlength)<base00x+radius) && (i<base00x+radius),Line[{},{}],
If[((i-edge0010*arrowlength)>base00x+1-radius) && (i>base00x+1-radius),Line[{},{}],
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (base00x+radius≤i≤base00x+1-radius),{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{i,base00y,base00z+(height/2)},{i-edge0010*arrowlength,base00y,base00z+height}}]},
If[(base00x+radius≤(i-edge0010*arrowlength)≤base00x+1-radius) && (i<base00x+radius),
{{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]}},
If[(base00x+radius≤ (i-edge0010*arrowlength)≤ base00x+1-radius) && (i>base00x+1-radius),{{Thickness[linewd],Line[{{i-edge0010*arrowlength,base00y,base00z},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i-edge0010*arrowlength,base00y,base00z+height}}]}},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength<base00x+radius),{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},
If[(base00x+radius≤ i≤ base00x+1-radius) && (i-edge0010*arrowlength>base00x+1-radius),{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{i,base00y,base00z+(height/2)},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},
If[((i-edge0010*arrowlength)<base00x+radius) && (i>base00x+1-radius),{{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+height-((height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]}},

{{Thickness[linewd],Line[{{base00x+1-radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))},{base00x+radius,base00y,base00z+(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))}}]},{Thickness[linewd],Line[{{base00x+radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+radius-(i-edge0010*arrowlength))},{base00x+1-radius,base00y,base00z+height-(-(height/(2*arrowlength)))*(base00x+1-radius-(i-edge0010*arrowlength))}}]}}
]
]
]
]
]
]
]
]}
,{i,base00x+radius-arrowlength+If[edge0010>0,inc,If[edge0010<0,-inc,0]],base00x+1-radius+arrowlength,arrowdelta}]]},
Boxed->False,ViewVector->{vx,vy,vz},Lighting->{{"Ambient",White}},PlotRange->{{base00x-2,base00x+2},{base00y-radius-2*highlightEpi,base00y+radius+2*highlightEpi},{base00z-highlightEpi-nslicesbelow*height,base00z+height+highlightEpi}},ImageSize->1000];

Supplementary Figure 4 [SUDDEN 497 & 1236]

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV497.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV497.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir497.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh497.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh497.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D2G[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1},{False,False},{PV[[1]][[i]]==1,PV[[2]][[i]]==1},{EdgeDir[[1]][[i]]},{1},{False},{EdgeV[[1]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
S497Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["S497Wall2.tiff",S497Wall,ImageResolution->500];

height=.25;
SetDirectory[wd];
PV=ReadList["PV497.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV497.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir497.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh497.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh497.txt",Number,RecordLists->True];
PV11=PV[[1]][[1]];
PV21=PV[[2]][[1]];
PV12=PV[[1]][[10]];
PV22=PV[[2]][[10]];
EdgeV11=EdgeV[[1]][[1]];
EdgeV12=EdgeV[[1]][[10]];
EdgeDir11=EdgeDir[[1]][[1]];
EdgeDir12=EdgeDir[[1]][[10]];
(Subscript[E, 1])=LandscapeSlice2D2G[{0,0,height},{.1,.25,1},{1,1},{GenoHigh[[1]][[1]]==1,GenoHigh[[1]][[2]]==1},{PV11==1,PV21==1},{EdgeDir11},{1},{EdgeHigh[[1]][[1]]==1},{EdgeV11==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.0025}];
(Subscript[E, 2])=LandscapeSlice2D2G[{0,0,0},{.1,.25,0},{1,1},{GenoHigh[[2]][[1]]==1,GenoHigh[[2]][[2]]==1},{PV12==1,PV22==1},{EdgeDir12},{1},{EdgeHigh[[2]][[1]]==1},{EdgeV12==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
S497WallHigh=Show[{(Subscript[E, 1]),(Subscript[E, 2])}]
Export["S497WallHigh.tiff",S497WallHigh,ImageResolution->500];

NSlices=10;
height=.25;
SetDirectory[wd];
PV=ReadList["PV1236.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV1236.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir1236.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh1236.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh1236.txt",Number,RecordLists->True];
For[i=1,i≤NSlices,i++,
(Subscript[E, i])=LandscapeSlice2D2G[{0,0,height*(NSlices-i)},{.1,.25,NSlices-i},{1,1},{False,False},{PV[[1]][[i]]==1,PV[[2]][[i]]==1},{EdgeDir[[1]][[i]]},{1},{False},{EdgeV[[1]][[i]]==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
];
S1236Wall=Show[Table[(Subscript[E, i]),{i,1,NSlices}]]
Export["S1236Wall2.tiff",S1236Wall,ImageResolution->500];

height=.25;
SetDirectory[wd];
PV=ReadList["PV1236.txt",Number,RecordLists->True];
EdgeV=ReadList["EdgeV1236.txt",Number,RecordLists->True];
EdgeDir=ReadList["EdgeDir1236.txt",Number,RecordLists->True];
GenoHigh=ReadList["GenoHigh1236.txt",Number,RecordLists->True];
EdgeHigh=ReadList["EdgeHigh1236.txt",Number,RecordLists->True];
PV11=PV[[1]][[1]];
PV21=PV[[2]][[1]];
PV12=PV[[1]][[10]];
PV22=PV[[2]][[10]];
EdgeV11=EdgeV[[1]][[1]];
EdgeV12=EdgeV[[1]][[10]];
EdgeDir11=EdgeDir[[1]][[1]];
EdgeDir12=EdgeDir[[1]][[10]];
(Subscript[E, 1])=LandscapeSlice2D2G[{0,0,height},{.1,.25,1},{1,1},{GenoHigh[[1]][[1]]==1,GenoHigh[[1]][[2]]==1},{PV11==1,PV21==1},{EdgeDir11},{1},{EdgeHigh[[1]][[1]]==1},{EdgeV11==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.0025}];
(Subscript[E, 2])=LandscapeSlice2D2G[{0,0,0},{.1,.25,0},{1,1},{GenoHigh[[2]][[1]]==1,GenoHigh[[2]][[2]]==1},{PV12==1,PV22==1},{EdgeDir12},{1},{EdgeHigh[[2]][[1]]==1},{EdgeV12==1},{.65,.01},{.5*(.8/7),2*(.8/7),0},{0,-12,10},{.002}];
S1236WallHigh=Show[{(Subscript[E, 1]),(Subscript[E, 2])}]
Export["S1236WallHigh.tiff",S1236WallHigh,ImageResolution->500];