checkpoint
[anneal.git] / src / edu / berkeley / qfat / Main.java
index f067158..d8896c2 100644 (file)
@@ -178,13 +178,13 @@ public class Main extends MeshViewer {
     }
 
     public synchronized void breakit() {
-        if (verts > 50) return;
+        if (verts > 300) return;
         PriorityQueue<Mesh.E> es = new PriorityQueue<Mesh.E>();
         for(Mesh.E e : tile.edges()) es.add(e);
         for(int i=0; i<10; i++) {
             Mesh.E e = es.poll();
             verts++;
-            System.out.println("shatter " + e);
+            //System.out.println("shatter " + e);
             e.shatter();
             tile.rebindPoints();
         }
@@ -193,7 +193,7 @@ public class Main extends MeshViewer {
     public synchronized void rand(double temperature, Mesh.Vert p) {
         double tile_score = tile.score();
         double goal_score = goal.score();
-        p.rescore();
+        p.reComputeError();
 
         Vec v = new Vec((random.nextFloat() - (float)0.5) / 1000,
                         (random.nextFloat() - (float)0.5) / 1000,
@@ -231,13 +231,14 @@ public class Main extends MeshViewer {
                 repaint();
                 for(Mesh.Vert v : hs) rand(10,v);
             }
+            tile.rebuildPointSet();
             breakit();
             repaint();
-            goal.unscoreAll();
+            goal.unApplyQuadricToNeighborAll();
             repaint();
             tile.recomputeAllFundamentalQuadrics();
             repaint();
-            goal.rescoreAll();
+            goal.applyQuadricToNeighborAll();
        }
     }