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 DataSymmetry { /**Here are the symmetry transformations*/ /*90 degree rotation*/ /*rotation in the origin*/ public static int[] rotate(int[] s) { int[] t={s[2],s[3],-s[0],s[1],s[4],s[5]}; return(t); } public static int[][] rotate(int[][] s) { int[][] t=new int[s.length][6]; for(int i=0;i0) choice=1; int[][] t=new int[s.length][6]; for(int i=0;i10000) throw new ProofException("overflow"); if(t[i]<-10000) throw new ProofException("overflow"); } int sign=1; if(choice==1) sign=-1; int[] u=new int[6]; u[0]=-sign*2*t[1]*t[4]+ t[0]*t[5] + sign*2*t[1]*t[5]; u[1]=2*t[1]*t[4]-t[1]*t[5]; u[2]=t[2]*t[5]; u[3]=2*t[3]*t[4]-t[3]*t[5]; u[4]=3*t[4]-2*t[5]; u[5]=2*t[4]-t[5]; return(u); } /*This is the map from Calculation 7*/ public static LongPolyhedron modular2(LongPolyhedron P) { int[][] s=toIntegers(P); s=modular2(s); LongPolyhedron Q=LongPolyhedron.fromIntegerList(P.SCALE,s); Q.FACE=P.FACE; Q.SCALE=P.SCALE; return(Q); } public static int[][] modular2(int[][] s) { int test=0; for(int i=0;i0) choice=1; int[][] t=new int[s.length][6]; for(int i=0;i10000) throw new ProofException("overflow"); if(t[i]<-10000) throw new ProofException("overflow"); } int sign=1; if(choice==1) sign=-1; int[] u=new int[6]; u[0]=-2*sign*t[1]*t[4]-t[0]*t[5]+sign*2*t[1]*t[5]; u[1]=2*t[1]*t[4]-3*t[1]*t[5]; u[2]=t[2]*t[5]; u[3]=-2*t[3]*t[4]+3*t[3]*t[5]; u[4]=-t[4]+2*t[5]; u[5]=-2*t[4]+3*t[5]; return(u); } /*This extracts the integer lists from the polyhedron*/ public static int[][] toIntegers(LongPolyhedron Q) { int[][] t=new int[Q.count][6]; for(int i=0;i