InPolyh() throws IOException {

  int  F = 0;
  tPointi q, bmin, bmax;
  int radius;

  String s;
  char c;
  char line[] = new char[20];
  int i = 0;
  int x, y, z;
  boolean flag;
  int counter;
  
  Vertices = new tPointi[PMAX];
  Faces = new tPointi[PMAX];
  Box = new tPointi[PMAX][2];

  n = ReadVertices();
  F = ReadFaces();
  VerifVertices();

  /* Initialize the bounding box */
  bmin = new tPointi();
  bmax = new tPointi();

  for ( i = 0; i < DIM; i++ )
    bmin.p[i] = bmax.p[i] = Vertices[0].p[i];

  radius = ComputeBox( n, bmin, bmax );

  System.out.println("radius=" + radius);

 System.out.println("Please input query point");
 i =0;
 counter = 0;
 flag = false;

 try{
          System.out.println("\n\nInput query point:\nCoord-s must be seperated by a *tab*\n"+
		       "ENTER after each point"+"\nTo finish input type end + "+
		       "ENTER at the end"+
		       "\nExample:\n17      23      123\n34      5      1\nend\n"+
		       "-----------------start entering data-------------------");
    do {

      do {
	c = (char) System.in.read();
	line[i] = c;
	i++;
      } while (c !='\n' );
      s = new String(line);
      s = s.substring(0,i-1);
      if (s.equals("end"))
	break;
      flag = false;
      counter = 0;
      for (int j=0; j < s.length(); j++) {
	if (s.charAt(j) == '\t') 
	  counter++; 
	if (counter == 2) {
	  flag = true; break; 
	}
      }
      if (flag) {
	int t = s.indexOf('\t');
	int t1 = s.lastIndexOf('\t');
	x = Integer.parseInt(s.substring(0,t));
	y = Integer.parseInt(s.substring(t+1,t1));
	z = Integer.parseInt(s.substring(t1+1,s.length()));
	q = new tPointi(x, y, z);

	//	q.x = x;
	//	q.y = y;
	//	q.z = z;
	i=0;
      }
      else 
	break;

      char ans = InPolyhedron(F, q, bmin, bmax, radius);
      System.out.println("InPolyhedron returned:  "+ans);

    } while (!s.equals("end"));
 }
catch (NumberFormatException e) {System.out.println ("Invalid input"); System.exit(1);}
}