}
public synchronized void breakit() {
- if (verts > 200) return;
+ if (verts > 50) 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++) {
public void anneal() throws Exception {
int verts = 0;
while(true) {
- for(int i=0; i<1; i++) {
+ HashSet<Mesh.Vert> hs = new HashSet<Mesh.Vert>();
+ for(Mesh.Vert p : tile.vertices()) hs.add(p);
+ for(int i=0; i<10; i++) {
repaint();
- for(Mesh.T t : tile)
- for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
- rand(10,p);
- }
- goal.unscore();
- tile.unscore();
- goal.fundamental();
- tile.fundamental();
- goal.rescore();
- tile.rescore();
+ for(Mesh.Vert v : hs) rand(10,v);
}
breakit();
+ repaint();
+ goal.unscore();
+ repaint();
+ tile.recomputeAllFundamentalQuadrics();
+ repaint();
+ goal.rescore();
}
}
p.unscore();
}
}
- public void fundamental() {
+ public void recomputeAllFundamentalQuadrics() {
HashSet<Vert> done = new HashSet<Vert>();
for(T t : this)
for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {