From: Ian Jackson Date: Tue, 21 Oct 2008 00:00:19 +0000 (+0100) Subject: get rim twist right X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=commitdiff_plain;h=d045b4e5e53daf45808a65f8811a1c6fbf7ecc98;ds=sidebyside get rim twist right --- diff --git a/energy.c b/energy.c index 2f8a854..aa2dd47 100644 --- a/energy.c +++ b/energy.c @@ -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[3]; + double distance_positive_z= distance[2]; double distance_radial_outwards= dotprod(distance, oncircle); rim_vertex_angles[v]= atan2(distance_positive_z, distance_radial_outwards); }