chiark
/
gitweb
/
~ian
/
moebius2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4df68fd
)
before abandon this version of rim twist which is nonsense
author
Ian Jackson
<ian@turbine>
Sun, 19 Oct 2008 22:13:27 +0000
(23:13 +0100)
committer
Ian Jackson
<ian@turbine>
Sun, 19 Oct 2008 22:13:27 +0000
(23:13 +0100)
energy.c
patch
|
blob
|
history
diff --git
a/energy.c
b/energy.c
index aefdd8beb6f6637c86971d3099c0e5a34bb3689d..b3af3faae50a8c705c0d2a7295b73e03b6648845 100644
(file)
--- 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( 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)
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];
double total_cost= 0.0;
double pq[D3], rs[D3], pq_x_rs[D3];
- FOR_RIM_VERTEX(vpy,vpx,vpi,
OUT
ER) {
+ FOR_RIM_VERTEX(vpy,vpx,vpi,
INN
ER) {
FOR_VPEDGE(e0) {
if (e0==0 || e0==3) continue;
vqi= EDGE_END2(vpi,e0); if (vqi<0) continue;
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);
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;
}
}
total_cost += cost;
}
}