import java.awt.geom.*; /*This class gets the polyhedra for the polygon exchange map. We have a 1-parameter family of polygon exchanges, and they fit together to make a fiber bundle which is an affine polyhedron exchange*/ public class DataPartition { /**There are 51 polyhedra in the partition from s=1/4 to s=2.*/ /**This creates the basic partition longPolyhedron. We scale up the picture by 420 so that we can work with integer polyhedra*/ public static LongPolyhedron poly(int k) { int[][] u=polyInt(k); LongPolyhedron P=LongPolyhedron.fromIntegerList(420,u); if(k>31) P=doMap(-1,k,P); P.MOVE=move(k); P.FACE=faceList(k); P.VOLUME=volume(k); return(P); } /*This creates the image under the PET*/ public static LongPolyhedron imagePoly(int k) { LongPolyhedron P=poly(k); LongPolyhedron Q=doMap(1,k,P); Q.FACE=faceList(k); Q.SCALE=P.SCALE; Q.VOLUME=volume(k); return(Q); } /*This creates the image under the map F'*/ public static LongPolyhedron halfImagePoly(int k) { LongPolyhedron P=poly(k); LongPolyhedron Q=doMap(2,k,P); Q.FACE=faceList(k); Q.SCALE=P.SCALE; return(Q); } /*This creates the partition for the map alpha f alpha used in Calculation 1.*/ public static LongPolyhedron alphaPoly(int k) { LongPolyhedron P=poly(k); P=DataSymmetry.alpha(calc1Data(k),P); return(P); } /*This creates the partition for the map beta f^{-1} beta used in Calculation 2.*/ public static LongPolyhedron betaPoly(int k) { LongPolyhedron Q=imagePoly(k); int m=calc2Data(k); int[] q={0,-2,2,-4,4}; Q=DataSymmetry.beta(q[m],Q); return(Q); } /**here is the raw data*/ public static int[][] polyInt(int k) { if(k<32) return(polyInt0(k)); return(DataSymmetry.invert(polyInt0(k-32))); } public static int[][] polyInt0(int k) { if(k==0) return(polyA0()); if(k==1) return(polyA1()); if(k==2) return(polyA2()); if(k==3) return(polyA3()); if(k==4) return(polyA4()); if(k==5) return(polyA5()); if(k==6) return(polyA6()); if(k==7) return(polyA7()); if(k==8) return(polyA8()); if(k==9) return(polyA9()); if(k==10) return(DataSymmetry.reflect(polyA1())); if(k==11) return(DataSymmetry.reflect(polyA2())); if(k==12) return(DataSymmetry.reflect(polyA3())); if(k==13) return(DataSymmetry.reflect(polyA4())); if(k==14) return(DataSymmetry.reflect(polyA5())); if(k==15) return(DataSymmetry.reflect(polyA6())); if(k==16) return(DataSymmetry.reflect(polyA7())); if(k==17) return(DataSymmetry.reflect(polyA8())); if(k==18) return(DataSymmetry.reflect(polyA9())); if(k==19) return(polyB0()); if(k==20) return(polyB1()); if(k==21) return(polyB2()); if(k==22) return(polyB3()); if(k==23) return(polyB4()); if(k==24) return(polyB5()); if(k==25) return(polyB6()); if(k==26) return(DataSymmetry.reflect(polyB1())); if(k==27) return(DataSymmetry.reflect(polyB2())); if(k==28) return(DataSymmetry.reflect(polyB3())); if(k==29) return(DataSymmetry.reflect(polyB4())); if(k==30) return(DataSymmetry.reflect(polyB5())); if(k==31) return(DataSymmetry.reflect(polyB6())); return(null); } /*The 19=1+9+9 tiles in [1/4,1/2]. 1+9 are listed and the other 9 are reflections of the ones listed. The first tile is trivial*/ public static int[][] polyA0() { int[][] t={{1,4,1,4,1,4},{-1,4,1,4,1,4},{-1,4,-1,4,1,4},{1,4,-1,4,1,4},{1,2,1,2,1,2},{-1,2,1,2,1,2},{-1,2,-1,2,1,2},{1,2,-1,2,1,2}}; return(t); } public static int[][] polyA1() { int[][] t={{1,1,0,1,1,4},{5,4,1,4,1,4},{3,4,1,4,1,4},{2,3,1,3,1,3}}; return(t); } public static int[][] polyA2() { int[][] t={{1,4,1,4,1,4},{2,3,1,3,1,3},{1,3,1,3,1,3},{1,2,-1,2,1,2}}; return(t); } public static int[][] polyA3() { int[][] t={{2,3,1,3,1,3},{1,3,1,3,1,3},{1,2,1,2,1,2},{1,2,-1,2,1,2},{1,1,0,1,1,2}}; return(t); } public static int[][] polyA4() { int[][] t={{5,4,1,4,1,4},{1,1,0,1,1,3},{1,1,0,1,1,2},{3,2,1,2,1,2},{1,2,1,2,1,2}}; return(t); } public static int[][] polyA5() { int[][] t={{3,4,-1,4,1,4},{1,1,0,1,1,4},{3,4,1,4,1,4},{1,1,0,1,2,7},{9,10,-1,10,3,10}}; return(t); } public static int[][] polyA6() { int[][] t={{1,1,0,1,2,7},{11,10,1,10,3,10},{1,1,0,1,1,3},{1,1,1,3,1,3},{2,3,1,3,1,3},{1,2,1,2,1,2}}; return(t); } public static int[][] polyA7() { int[][] t={{3,4,1,4,1,4},{1,1,0,1,2,7},{9,10,-1,10,3,10},{1,1,0,1,1,3}}; return(t); } public static int[][] polyA8() { int[][] t={{3,4,-1,4,1,4},{3,4,1,4,1,4},{1,4,1,4,1,4},{1,4,-1,4,1,4},{1,1,0,1,1,3},{2,3,1,3,1,3},{1,2,-1,2,1,2},{1,1,0,1,1,2}}; return(t); } public static int[][] polyA9() { int[][] t={{1,1,0,1,1,4},{5,4,1,4,1,4},{1,1,0,1,2,7},{11,10,1,10,3,10},{1,1,1,3,1,3},{2,3,1,3,1,3}}; return(t); } /**the 13=1+6+6 tiles in [1/2,1]. 1+6 are listed and the other 6 are reflections of the ones listed.*/ public static int[][] polyB0() { int[][] t={{1,2,1,2,1,2},{-1,2,1,2,1,2},{-1,2,-1,2,1,2},{1,2,-1,2,1,2},{1,1,0,1,1,1},{-1,1,0,1,1,1},{0,1,-1,1,1,1},{0,1,1,1,1,1}}; return(t); } public static int[][] polyB1() { int[][] t={{1,1,1,1,1,1},{2,1,1,1,1,1},{1,1,0,1,1,1},{3,2,1,2,1,2}}; return(t); } public static int[][] polyB2() { int[][] t={{1,1,0,1,1,2},{3,2,1,2,1,2},{1,2,1,2,1,2},{0,1,1,1,1,1}}; return(t); } public static int[][] polyB3() { int[][] t={{1,1,0,1,2,3},{5,4,1,4,3,4},{1,1,0,1,1,1},{1,1,1,1,1,1},{0,1,1,1,1,1}}; return(t); } public static int[][] polyB4() { int[][] t={{1,2,1,2,1,2},{1,1,0,1,2,3},{3,4,-1,4,3,4},{1,1,0,1,1,1}}; return(t); } public static int[][] polyB5() { int[][] t={{1,2,1,2,1,2},{1,2,-1,2,1,2},{1,1,0,1,1,2},{1,1,0,1,2,3},{3,4,-1,4,3,4}}; return(t); } public static int[][] polyB6() { int[][] t={{1,1,0,1,1,2},{3,2,1,2,1,2},{1,1,0,1,2,3},{5,4,1,4,3,4},{1,1,1,1,1,1},{0,1,1,1,1,1}}; return(t); } /**The moves*/ /*This takes the arithmetic graph data for the polyhedron and converts it into an affine map.*/ public static LongAffine fromIntegers(int[] t) { LongMatrix m=new LongMatrix(); m.a[0][0]=1; m.a[1][0]=0; m.a[2][0]=0; m.a[0][1]=0; m.a[1][1]=1; m.a[2][1]=0; m.a[0][2]=-2*t[3]+2*t[1]; m.a[1][2]=-2*t[3]-2*t[1]; m.a[2][2]=1; LongVector v=new LongVector(-2*t[0],2*t[2],0); LongAffine A=new LongAffine(m,v); return(A); } /*This does the basic maps on the polyhedra, according to the following scheme: sign=2: do the map F' sign=1 do the map F sign=-1 do the map F^{-1} */ public static LongPolyhedron doMap(int sign,int k,LongPolyhedron P) { LongPolyhedron Q=new LongPolyhedron(P); Q.count=P.count; int[] t=move(k); for(int i=0;i<4;++i) t[i]=sign*t[i]; if(sign==2) t=halfMove(k); LongAffine A=fromIntegers(t); A.v=A.v.scale(P.SCALE); for(int i=0;i