From: adam Date: Thu, 6 Dec 2007 01:07:41 +0000 (-0800) Subject: really really good X-Git-Url: http://git.megacz.com/?p=anneal.git;a=commitdiff_plain;h=e7caf167b9ca619310bb06ccc4a5079605396f22 really really good darcs-hash:20071206010741-5007d-3be38ed3a6fda07a5eb276e1f6e447fcdd771160.gz --- diff --git a/src/edu/berkeley/qfat/Main.java b/src/edu/berkeley/qfat/Main.java index f2e3cc4..982119b 100644 --- a/src/edu/berkeley/qfat/Main.java +++ b/src/edu/berkeley/qfat/Main.java @@ -226,6 +226,7 @@ public class Main extends MeshViewer { tile.score_against = goal; goal.score_against = tile; + tile.tilemesh = true; } public synchronized void breakit() { @@ -298,8 +299,8 @@ public class Main extends MeshViewer { if (breaks) { breaks = false; breakit(); - gamma = 1; - //gamma = 2; + //gamma = 1; + gamma = 2; //temp = last * 0.8f; //last = temp; //temp = hightemp; @@ -315,8 +316,8 @@ public class Main extends MeshViewer { gamma = 0.95f; } else { breakit(); - //gamma = 2; - gamma = 1; + gamma = 2; + //gamma = 1; //temp = last * 0.8f; //last = temp; //temp = hightemp; diff --git a/src/edu/berkeley/qfat/Mesh.java b/src/edu/berkeley/qfat/Mesh.java index d3e85f9..87cf35d 100644 --- a/src/edu/berkeley/qfat/Mesh.java +++ b/src/edu/berkeley/qfat/Mesh.java @@ -233,7 +233,9 @@ public class Mesh implements Iterable { } public void computeError() { if (quadric_count == 0) { - if (nearest_in_other_mesh == null) { + if (!tilemesh) { + } + else if (nearest_in_other_mesh == null) { if (score_against != null) { Vert ne = score_against.nearest(p); oldscore = ne.fundamentalQuadric().preAndPostMultiply(p) * 100 * 10; @@ -244,7 +246,7 @@ public class Mesh implements Iterable { oldscore = nearest_in_other_mesh.fundamentalQuadric().preAndPostMultiply(p) * 100 * 10; } } else { - oldscore = (quadric.preAndPostMultiply(p) * 100) / quadric_count; + oldscore = (quadric.preAndPostMultiply(p) * 100) /*/ quadric_count*/; } oldscore = oldscore; @@ -255,18 +257,20 @@ public class Mesh implements Iterable { do { double ang = Math.abs(e.crossAngle()); if (ang > Math.PI) throw new Error(); + /* if (e.t != null) { numaspects++; aspects += e.t.aspect()*e.t.aspect(); } - - float minangle = (float)(Math.PI * 0.3); + */ + /* + float minangle = (float)(Math.PI * 0.8); if (ang > minangle) oldscore += (ang - minangle); - + */ e = e.pair.next; } while (e != this.e); - //if (numaspects > 0) oldscore += (aspects / numaspects); + if (numaspects > 0) oldscore += (aspects / numaspects); //System.out.println(oldscore); //oldscore = oldscore*oldscore; @@ -805,5 +809,5 @@ public class Mesh implements Iterable { p3().glVertex(gl); } } - + public boolean tilemesh = false; }