import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; /**This routine defines additional routines for boxes that are not used in the proof. These other routines are used either for graphical purposes, or as components of sanity checks for various routines used in the proof.**/ public class XtraBox { /**This routine finds a dyadic box of the given size that contains the given point */ /**for squares**/ public static Box dyadic0(Complex z,int kk) { Box B=new Box(new Complex(0,0),-2,0,1); Box C=new Box(B); for(int q=0;q0) gp.lineTo((float)(Z[i].x),(float)(Z[i].y)); } gp.closePath(); return(gp); } /**Checks whether a box contains a point**/ public static int contains(Box B,Complex w) { if(B.type==0) return(contains0(B,w)); return(contains1(B,w)); } public static int contains0(Box B,Complex w) { Complex[] Z=B.toVertices(); if(w.xZ[2].x) return(0); if(w.yZ[2].y) return(0); return(1); } public static int contains1(Box B,Complex w) { Complex[] Z=B.toVertices(); if(w.xZ[1].x) return(0); return(1); } }