import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; /**This file contains the proof that the polyhedra of the torus partition actually cover.*/ public class ProofCompact1 implements Runnable { int halt; Manager M; public ProofCompact1(Manager MM) { this.M=MM; } public void failMessage() { throw(new ProofException("ProofCompactCover")); } public void run() { System.out.println("START"); checkPlatinum(); checkConvex(); checkDisjoint(); checkCover(); System.out.println("END"); } /**COVERING TEST**/ public void checkCover() { for(int k=0;k<10;++k) checkCover(k); } public void checkCover(int k) { int total=0; System.out.print("cover test: "+k+" "); GoldenPolyWedge[] ALL=polyList(k); for(int i=0;i0) failMessage(); System.out.println("end"); } public GoldenPolyhedron[] polyList() { int total=0; GoldenPolyhedron[] LIST=new GoldenPolyhedron[64]; for(int i=0;i<64;++i) { LIST[i]=DataPartition.getGoldenPolyhedron(i); } return(LIST); } public GoldenPolyWedge[] polyList(int k) { GoldenPolyhedron[] LIST=polyList(); GoldenReal[] LIST2=DataPartitionRaw.getHeight(); LIST2=GoldenReal.interlace(LIST2); GoldenReal HEIGHT=LIST2[k]; GoldenPolyWedge[] LIST3=new GoldenPolyWedge[64]; int total=0; for(int i=0;i<64;++i) { GoldenPolyWedge Q=GoldenPolyCombinatorics.intersect(LIST[i],HEIGHT); if(Q!=null) { LIST3[total]=new GoldenPolyWedge(Q); ++total; } } GoldenPolyWedge[] LIST4=new GoldenPolyWedge[total]; for(int i=0;i0) failMessage(); } /**This routine returns true if it can prove that the two polyhedra have disjoint interiors. **/ public boolean disjoint(GoldenPolyhedron P1,GoldenPolyhedron P2) { if(disjoint1(P1,P2)==true) return(true); return(false); } public boolean disjoint1(GoldenPolyhedron P1,GoldenPolyhedron P2) { int n1=P1.count; int n2=P2.count; GoldenVector[] W=new GoldenVector[4]; for(int i1=0;i10) failMessage(); System.out.println("end"); } public boolean testPlatinum(GoldenPolyhedron P) { int[][] LIST=GoldenPolyCombinatorics.edgeList(P); for(int a=0;a50) return(false); if(Math.abs(rr[1])>50) return(false); } return(true); } /**CONVEXITY TEST**/ public void checkConvex() { System.out.print("convex test: "); int total=0; for(int i=0;i<64;++i) { GoldenPolyhedron P=DataPartition.getGoldenPolyhedron(i); boolean test=convex(P,2); if(test==false) ++total; } if(total>0) failMessage(); System.out.println("end"); } /**This is a test for strict convexity at a vertex. We dot the vertex and all the others with one of the first (2L+1)^6 GoldenVectors and verify that the given vertex has the largest dot product in at least one case. Taking L=2 works for our purposes.*/ public boolean convex(GoldenPolyhedron P,int L) { for(int i=0;i