import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; import java.io.*; /**Say that an N-tile is a convex polygon P in the fundamental strip such that N iterates of the pinwheel map are entirely defined on the interior of P. This routine takes a pair (P,N), where P is a golden polygon and N is an integer, and verifies rigorously that P is an N-tile. Since we have proved the compactification theorem, we use the 3D polyhedron exchange for the verification. So, the verification works like this: 1. we use floating point arithmetic to compute the itinerary of the center of mass of P. This gives us an integer sequence I(N) 2. We verify that all vertices have I(N) as a feasible itinerary. This guarantees that all interior points have I(N) as the actual (and unique) itinerary. **/ public class VerifyTile { /**MAIN ROUTINES**/ /**This routine verifies that P is a periodic orbit tile having period at most LIM.**/ public static int verifyPeriodic(GoldenPolyWedge P,int LIM,boolean print) { int[] I=VerifySupport.getItinerary(P,LIM); boolean test=verify(P,I); if(test==false) return(-1); GoldenVector V=VerifySupport.getTotalMove(I); if(V.isZero()==false) return(-1); if(print==true) { System.out.println("periodic itinerary"); Lists.printout(I); } return(I.length); } /**This routine verifies that a given GoldenComplex, when mapped into the torus, has the given itinerary as a feasible itinerary.*/ public static boolean verify(GoldenPolyWedge P,int[] I) { for(int i=0;i