checkpoint
[anneal.git] / src / edu / berkeley / qfat / Main.java
index b774066..000fd94 100644 (file)
@@ -264,10 +264,21 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
         r1 = r1 - (float)Math.floor(r1);
         r1 = r1 * (float)0.01;
         r1 = r1 - (float)0.005;
+        /*
+        public Vert partner() { return quadric==null ? this : quadric; }
+        public Point quadric() { return quadric_count==0 ? partner().p :
+                new Point(quadric_x/quadric_count, quadric_y/quadric_count, quadric_z/quadric_count); }
 
         Vec v = p.nearest_vert_in_other_mesh().minus(p.p).norm().times(r1);
-
+        */
         //v = p.norm().times(v.dot(p.norm()));
+        /*
+        Vec v = new Vec((random.nextFloat() - (float)0.5) / 1000,
+                        (random.nextFloat() - (float)0.5) / 1000,
+                        (random.nextFloat() - (float)0.5) / 1000);
+        */
+        Matrix inv = p.errorQuadric();
+        Vec v = new Vec(inv.d, inv.h, inv.l).norm().times(1/(float)1000);
 
         boolean aspect = false;//(Math.abs(random.nextInt()) % 100) <= 2;
         Matrix old_tile_aspect = null;//goal.aspect;
@@ -412,7 +423,7 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
                 for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
                     p.p.glVertex(gl);
                     //p.plus(p.norm().times(p.score()*10)).glVertex(gl);
-                    p.partner().p.glVertex(gl);
+                    //p.partner().p.glVertex(gl);
                     //tile.nearest(p).centroid().glVertex(gl);
                 }