chiark / gitweb /
changed powers on vertex displacements -- tweaked parameters for XBITS==5
[moebius2.git] / energy.c
index 8bc125af99f53df80d45f60e507cea337cf7efa7..2b6c04cf98a41d878f064d1ae8e38af666558de2 100644 (file)
--- a/energy.c
+++ b/energy.c
@@ -51,8 +51,8 @@ static const CostContribution costs[]= {
 
 #if XBITS==4
 #define STOP_EPSILON 5e-3
-    COST(  3e3,   vertex_displacement_cost)
-    COST(  3e3,   vertex_edgewise_displ_cost)
+    COST(  3e3,   vertex_displacement_cost) // NB this is probably wrong now
+    COST(  3e3,   vertex_edgewise_displ_cost) // we have changed the power
     COST( 0.2e3,  rim_proximity_cost)
     COST( 1e4,  rim_twist_cost)
     COST(  1e12,   noncircular_rim_cost)
@@ -63,9 +63,9 @@ static const CostContribution costs[]= {
 #endif
 
 #if XBITS==5
-#define STOP_EPSILON 1.2e-4
-    COST(  3e3,   vertex_displacement_cost)
-    COST(  3e3,   vertex_edgewise_displ_cost)
+#define STOP_EPSILON 1e-5
+    COST(  3e4,   vertex_displacement_cost)
+    COST(  3e4,   vertex_edgewise_displ_cost)
     COST(  2e-1,  rim_proximity_cost)
     COST(  3e3,  rim_twist_cost)
     COST(  1e12,   noncircular_rim_cost)
@@ -300,7 +300,7 @@ static double vertex_one_displ_cost(const double r[D3], const double s[D3],
 
 double vertex_displacement_cost(const Vertices vertices, int section) {
   const double inv_lambda= 1.0/1; //2;
-  const double delta= 4;
+  const double delta= 6;
 
   int si,e,qi,ri;
   double total_cost= 0;
@@ -325,7 +325,7 @@ double vertex_displacement_cost(const Vertices vertices, int section) {
 
 double vertex_edgewise_displ_cost(const Vertices vertices, int section) {
   const double inv_lambda= 1.0/1; //2;
-  const double delta= 4;
+  const double delta= 6;
 
   int pi,e,qi,ri,si, k;
   double m[D3];