new Matrix(new Vec(rshift, depth, halfup)),
new Matrix(new Vec(lshift, -depth, halfup)),
new Matrix(new Vec(rshift, -depth, halfup)),
- /*
- new Matrix(new Vec(lshift, depth, -halfup)),
- new Matrix(new Vec(rshift, depth, -halfup)),
- new Matrix(new Vec(lshift, -depth, -halfup)),
- new Matrix(new Vec(rshift, -depth, -halfup)),
- */
new Matrix(new Vec(lshift, 0, height)),
new Matrix(new Vec(rshift, 0, height)),
new Matrix(new Vec( width, 0, 0)),
new Matrix(new Vec(-width, 0, 0)),
+
};
}
public synchronized void rand(float temp, Mesh.Vert p) {
- double tile_score = tile.score();
- double goal_score = goal.score();
//p.reComputeError();
p.reComputeErrorAround();
+ double tile_score = tile.score();
+ double goal_score = goal.score();
- Vec v = new Vec((random.nextFloat() - (float)0.5) / 400,
- (random.nextFloat() - (float)0.5) / 400,
- (random.nextFloat() - (float)0.5) / 400);
+ Vec v = new Vec((random.nextFloat() - (float)0.5) / 200,
+ (random.nextFloat() - (float)0.5) / 200,
+ (random.nextFloat() - (float)0.5) / 200);
/*
Matrix inv = p.errorQuadric();
- Vec v = new Vec(inv.d, inv.h, inv.l).norm().times(1/(float)1000);
+ v = new Vec(inv.d, inv.h, inv.l).norm().times(1/(float)1000);
*/
+
boolean good = p.move(v);
p.reComputeErrorAround();
if (breaks) {
breaks = false;
breakit();
- gamma = 2;
+ gamma = 1;
+ //gamma = 2;
//temp = last * 0.8f;
//last = temp;
//temp = hightemp;
gamma = 0.95f;
} else {
breakit();
- gamma = 2;
+ //gamma = 2;
+ gamma = 1;
//temp = last * 0.8f;
//last = temp;
//temp = hightemp;
oldscore = (quadric.preAndPostMultiply(p) * 100) / quadric_count;
}
- oldscore = oldscore*oldscore;
+ oldscore = oldscore;
int numaspects = 0;
float aspects = 0;
aspects += e.t.aspect()*e.t.aspect();
}
- if (ang > Math.PI * 0.8)
- oldscore += (ang - (Math.PI*0.8)) * 10;
+ float minangle = (float)(Math.PI * 0.3);
+ 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;
public boolean has(Vert v) { return v1()==v || v2()==v || v3()==v; }
public void glVertices(GL gl) {
-
+ /*
if (e1().bind_to.set.size() == 0) return;
if (e2().bind_to.set.size() == 0) return;
if (e3().bind_to.set.size() == 0) return;
-
+ */
norm().glNormal(gl);
p1().glVertex(gl);
p2().glVertex(gl);
green -= .12f;
blue -= .15f;
- if (triangles) switch(t.color/*class*/) {
+ if (triangles) switch(t.colorclass) {
case 0: gl.glColor4f((float)0.25, (float)0.25, (float)0.75, (float)0.3); break;
case 1: gl.glColor4f((float)0.25, (float)0.75, (float)0.25, (float)0.3); break;
case 2: gl.glColor4f((float)0.75, (float)0.25, (float)0.25, (float)0.3); break;