checkpoint
[anneal.git] / src / edu / berkeley / qfat / Main.java
index bb15b3b..ad6f5a7 100644 (file)
@@ -31,7 +31,6 @@ public class Main extends MeshViewer {
         // rotate to align major axis -- this probably needs to be done by a human.
         goal.transform(new Matrix(new Vec(0, 0, 1), (float)(Math.PI/2)));
 
-
         float goal_width  = goal.diagonal().dot(new Vec(1, 0, 0));
         float goal_height = goal.diagonal().dot(new Vec(0, 1, 0));
         float goal_depth  = goal.diagonal().dot(new Vec(0, 0, 1));
@@ -163,7 +162,7 @@ public class Main extends MeshViewer {
         //tx.e3.shatter();
 
 
-        tile.bind();
+        tile.rebindPoints();
 
         //mid.move(new Vec((float)0,0,(float)-0.05));
         //ltn.move(new Vec((float)0,0,(float)-0.05));
@@ -187,8 +186,7 @@ public class Main extends MeshViewer {
             verts++;
             System.out.println("shatter " + e);
             e.shatter();
-            tile.unbind();
-            tile.bind();
+            tile.rebindPoints();
         }
     }
 
@@ -222,15 +220,13 @@ public class Main extends MeshViewer {
         }
     }
 
-
     public static int verts = 0;
+
     public void anneal() throws Exception {
         int verts = 0;
         while(true) {
-            //Thread.sleep(10);
             for(int i=0; i<1; i++) {
                 repaint();
-                //tile.ts.get(Math.abs(random.nextInt()) % tile.ts.size()).e1().p1
                 for(Mesh.T t : tile)
                     for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
                         rand(10,p);
@@ -244,7 +240,6 @@ public class Main extends MeshViewer {
             }
             breakit();
        }
-
     }
 
     public static void main(String[] s) throws Exception {