chiark / gitweb /
a good 246
authorIan Jackson <ian@turbine>
Fri, 24 Oct 2008 18:52:50 +0000 (19:52 +0100)
committerIan Jackson <ian@turbine>
Fri, 24 Oct 2008 18:52:50 +0000 (19:52 +0100)
energy.c

index aa2dd47fa4364eed4fc5c616ca2336ba9573eee9..8bce859bfd177275017dce2da4d1aac5653d3d2d 100644 (file)
--- a/energy.c
+++ b/energy.c
@@ -53,7 +53,7 @@ static const CostContribution costs[]= {
 #define STOP_EPSILON 5e-3
     COST(  3e4,   vertex_displacement_cost) // NB this is probably wrong now
     COST(  3e4,   vertex_edgewise_displ_cost) // we have changed the power
-    COST( 2e2,  rim_proximity_cost)
+    COST( 0.2e3,  rim_proximity_cost)
     COST( 1e4,  rim_twist_cost)
     COST(  1e12,   noncircular_rim_cost)
     COST(  10e1,   nonequilateral_triangles_cost)
@@ -63,7 +63,7 @@ static const CostContribution costs[]= {
 #endif
 
 #if XBITS==5
-#define STOP_EPSILON 7e-4
+#define STOP_EPSILON 1e-5
     COST(  3e4,   vertex_displacement_cost)
     COST(  3e4,   vertex_edgewise_displ_cost)
     COST(  2e-1,  rim_proximity_cost)
@@ -76,11 +76,11 @@ static const CostContribution costs[]= {
 #endif
 
 #if XBITS==6
-#define STOP_EPSILON 1.2e-4
+#define STOP_EPSILON 1.2e-5
     COST(  3e4,   vertex_displacement_cost)
     COST(  3e4,   vertex_edgewise_displ_cost)
-    COST( 2e-1,  rim_proximity_cost)
-    COST(  1e3,  rim_twist_cost)
+    COST( 3e-2,  rim_proximity_cost)
+    COST(  1e4,  rim_twist_cost)
     COST(  1e12,   noncircular_rim_cost)
     COST(  10e1,   nonequilateral_triangles_cost)
 //    COST(  1e1,   small_triangles_cost)
@@ -516,7 +516,7 @@ void compute_rim_twist_angles(const Vertices vertices, int section) {
     /* we are interested in the angle subtended at the rim, from the
      * rim's point of view. */
     K distance[k]= vertices[v][k] - oncircle[k];
-    double distance_positive_z= distance[2];
+    double distance_positive_z= distance[3];
     double distance_radial_outwards= dotprod(distance, oncircle);
     rim_vertex_angles[v]= atan2(distance_positive_z, distance_radial_outwards);
   }