X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=energy.c;h=8bce859bfd177275017dce2da4d1aac5653d3d2d;hb=9e8860ae32184285e451568d39df79baf7f44aff;hp=8bc125af99f53df80d45f60e507cea337cf7efa7;hpb=7bc1fc859f691dbd2194883ed3160411a082bbc8;p=moebius2.git diff --git a/energy.c b/energy.c index 8bc125a..8bce859 100644 --- 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( 3e4, vertex_displacement_cost) // NB this is probably wrong now + COST( 3e4, 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) @@ -76,10 +76,10 @@ static const CostContribution costs[]= { #endif #if XBITS==6 -#define STOP_EPSILON 1.2e-4 - COST( 3e3, vertex_displacement_cost) - COST( 3e3, vertex_edgewise_displ_cost) - COST( 0.02e0, rim_proximity_cost) +#define STOP_EPSILON 1.2e-5 + COST( 3e4, vertex_displacement_cost) + COST( 3e4, vertex_edgewise_displ_cost) + COST( 3e-2, rim_proximity_cost) COST( 1e4, rim_twist_cost) COST( 1e12, noncircular_rim_cost) COST( 10e1, nonequilateral_triangles_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];