chiark / gitweb /
get rim twist right
[moebius2.git] / energy.c
index 2f8a854cde076656b02c3c0799cc2fbdd5634cf1..aa2dd47fa4364eed4fc5c616ca2336ba9573eee9 100644 (file)
--- 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);
   }