// RIII.fe
// Schoen's triply periodic RII surface
// In 30-60-90 right prism

// Programmer: Ken Brakke, brakke@susqu.edu, http://www.susqu.edu

/* Commands:
   gogo - typical evolution
   layers - 4 x 4 grid of two layers
   stack4 - stack of units showing tunnels resolving two perpendicular planes
   stack6 - stack of units showing tunnels resolving three perpendicular planes
   stack12 - stack of units showing tunnels resolving six planes
   transforms off - show just single fundamental region
   setcolor - to color one side yellow, as in my web page.

   To turn off showing all the edges in the graphics display,
      hit the "e" key in the graphics window.
*/

#define HT  0.5    // height of prism

view_transform_generators 6 // one 180 degree rotation about each line
swap_colors
1 0 0 0    // a: x-axis
0 -1 0 0
0 0 -1 0 
0 0 0 1

swap_colors
-1 0 0 0  // b: y-axis
0 1 0 0 
0 0 -1 0
0 0 0 1

swap_colors
-.5  -sqrt(3)/2 0 3*sqrt(3)/2   // c: front hyp
-sqrt(.75) .5 0 1.5
0 0 -1 0
0 0 0 1

swap_colors
1 0 0 0    // d: x-axis upper
0 -1 0 0
0 0 -1 2*HT 
0 0 0 1

swap_colors
-1 0 0 0  // e: y-axis upper
0 1 0 0 
0 0 -1 2*HT
0 0 0 1

swap_colors
-.5  -sqrt(3)/2 0 3*sqrt(3)/2   // f: front hyp
-sqrt(.75) .5 0 1.5
0 0 -1 2*HT
0 0 0 1

vertices
1    0 0 0 fixed
2    sqrt(3) 0 0 fixed
3    0 3 0 fixed
4    0 0 HT fixed
5    sqrt(3) 0 HT fixed
6    0 3 HT fixed

edges
1   1 2 fixed
2   2 3 fixed
3   3 1 fixed
4   4 5 fixed
5   5 6 fixed
6   6 4 fixed
7   1 4
8   2 5
9   3 6

faces
1   1 8 -4 -7
2   2 9 -5 -8
3   3 7 -6 -9


read
hessian_normal

// typical evolution
gogo := { refine edge where fixed;
	  g 5; r; g 10; V; u; g 5; u; V; u; V; g 17; V; u; g 24; 
	  U; g 22; V;  r; g 6; V;  r; u; V; u; V; g 12; 
          hessian_seek; hessian_seek;
	  hessian; hessian;
	  }

// Set inside color to yellow
setcolor := { set facet backcolor yellow }

// 4x4 grid of two layers
layers := { transform_expr "fdfedfe"; show_trans "R"; }
stack12 := { transform_expr "febfefe"; show_trans "R"; }
stack4 := { transform_expr "eaedabab"; show_trans "R"; }
stack6 := { transform_expr "dfacdf"; show_trans "R"; }

/* Commands:
   gogo - typical evolution
   layers - 4 x 4 grid of two layers
   stack4 - stack of units showing tunnels resolving two perpendicular planes
   stack6 - stack of units showing tunnels resolving three perpendicular planes
   stack12 - stack of units showing tunnels resolving six planes
   transforms off - show just single fundamental region
   setcolor - to color one side yellow, as in my web page.

   To turn off showing all the edges in the graphics display,
      hit the "e" key in the graphics window.
*/

