From b45f8ea848f5c92004637a794720d5f014077142 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 19 Oct 2008 23:13:27 +0100 Subject: [PATCH] before abandon this version of rim twist which is nonsense --- energy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/energy.c b/energy.c index aefdd8b..b3af3fa 100644 --- a/energy.c +++ b/energy.c @@ -49,6 +49,7 @@ static const CostContribution costs[]= { COST( 3e3, vertex_displacement_cost) COST( 3e3, vertex_edgewise_displ_cost) COST( 0.2e3, rim_proximity_cost) + COST( 1e6, rim_twist_cost) COST( 1e12, noncircular_rim_cost) COST( 10e1, nonequilateral_triangles_cost) // COST( 1e1, small_triangles_cost) @@ -514,7 +515,7 @@ double rim_twist_cost(const Vertices vertices, int section) { double total_cost= 0.0; double pq[D3], rs[D3], pq_x_rs[D3]; - FOR_RIM_VERTEX(vpy,vpx,vpi, OUTER) { + FOR_RIM_VERTEX(vpy,vpx,vpi, INNER) { FOR_VPEDGE(e0) { if (e0==0 || e0==3) continue; vqi= EDGE_END2(vpi,e0); if (vqi<0) continue; @@ -530,6 +531,9 @@ double rim_twist_cost(const Vertices vertices, int section) { double cost= magnD2(pq_x_rs) / (magndiv*magndiv + our_epsilon); +//fprintf(stderr,"rimtwist P=%03x Q=%03x R=%03x S=%03x e0=%d e1=%d %f\n", +// vpi,vqi,vri,vsi,e0,e1, cost); + total_cost += cost; } } -- 2.30.2