Ejemplo n.º 1
0
 public static void exportCHTsin(DelaunayTriangulation dto, String tsinFile) throws IOException {
   FileWriter fw = new FileWriter(tsinFile);
   PrintWriter os = new PrintWriter(fw);
   // prints the tsin file header:
   os.println(dto.getConvexHullSize());
   Iterator<Point> it = dto.getConvexHullVerticesIterator();
   while (it.hasNext()) {
     Point p = it.next();
     os.println(String.format("%s %s", p.getX(), p.getY()));
   }
   os.close();
   fw.close();
 }