// fig8hole.fe
// Evolver data for figure 8 knot with  film with one hole.

parameter aparam = 0.2  // for inner radius of knot

boundary 1 parameter 1 convex  // parametric curve
x1: aparam*cos(p1) + 0.5*sin(p1) + (1-aparam)*cos(3*p1) - 0.5*sin(3*p1)
x2: cos(2*p1) + (sqrt(2)*aparam - sqrt(0.5))*sin(2*p1)
x3: 0.5*cos(p1) - aparam*sin(p1) + 0.5*cos(3*p1) + (1-aparam)*sin(3*p1)

vertices
1    0*pi/8  boundary 1   
2    1*pi/8  boundary 1   
3    2*pi/8  boundary 1   
4    3*pi/8  boundary 1   
5    4*pi/8  boundary 1   
6    5*pi/8  boundary 1   
7    6*pi/8  boundary 1   
8    7*pi/8  boundary 1   
9    8*pi/8  boundary 1   
10   9*pi/8  boundary 1   
11  10*pi/8  boundary 1    
12  11*pi/8  boundary 1   
13  12*pi/8  boundary 1   
14  13*pi/8  boundary 1   
15  14*pi/8  boundary 1   
16  15*pi/8  boundary 1   
17  0 0 0 

edges
1     1 2 boundary 1  
2     2 3 boundary 1   
3     3 4 boundary 1   
4     4 5 boundary 1   
5     5 6 boundary 1   
6     6 7 boundary 1   
7     7 8 boundary 1   
8     8 9 boundary 1   
9     9 10 boundary 1   
10    10 11 boundary 1   
11    11 12 boundary 1   
12    12 13 boundary 1   
13    13 14 boundary 1   
14    14 15 boundary 1   
15    15 16 boundary 1   
16    16 1  boundary 1   
17   7 15
18   7 1
19   11 5
20   3 13
21   15 9

faces
1   17 15 16 -18 
2   18 1 2 20 13 14 -17
3   3 4 -19 11 12 -20
4   5 6 17 21 9 10 19
5   7 8 -21 -17


read 
hessian_normal

// Typical evolution.  Ideally, the places where the wire passes
// through the film have some fascinating fine detail as the triple
// lines go tangent to the wire, but this evolution does not go far
// enough to resolve such detail.  Final energy 9.947477.
gogo := {  refine edge where on_boundary 1;
	   O;  // pop quadruple edge 
	   g 10; V; u; V; r; g 20; r; g 20; w .002; g 10; u; u; V; g 10;
           fix vertex where on_boundary 1; k 0;  // so can use Hessian
	   fix edge where on_boundary 1;
           hessian; hessian;
	}

// an alternate evolution, which gives a different film by popping the
// quadruple edge the other way.  Final energy 9.87494.
gogogo := {  refine edge where on_boundary 1;
             u; u; V; g 5; r; g 5;
   	     O;  // pop quadruple edge 
	     g 10; t .01; V; u; V; r; g 20;
	     w .005; refine edge where valence==3; u;u;u;V; g 5;
	     l .32; u; u; V; g 5;
             fix vertex where on_boundary 1; k 0;  // so can use Hessian
	     fix edge where on_boundary 1;
             hessian; hessian;
	  }
