chiark / gitweb /
new vertex numbering for project too
authorIan Jackson <ian@davenant.relativity.greenend.org.uk>
Mon, 31 Dec 2007 03:36:28 +0000 (03:36 +0000)
committerIan Jackson <ian@davenant.relativity.greenend.org.uk>
Mon, 31 Dec 2007 03:36:28 +0000 (03:36 +0000)
project.c

index 266237f90b222be270b723c5845007ff85330e36..1ce6db66d492867a869ed833b2a9e9c6931067a8 100644 (file)
--- a/project.c
+++ b/project.c
@@ -63,14 +63,14 @@ static void generate_display_list(void) {
 
   ntris= 0;
   FOR_VERTEX(vb) {
 
   ntris= 0;
   FOR_VERTEX(vb) {
-    /* We use the two triangles in the parallelogram vb, vb+e1, vb+e0, vb+e2.
+    /* We use the two triangles in the parallelogram vb, vb+e0, vb+e1, vb+e2.
      * We go round each triangle clockwise (although our surface is non-
      * orientable so it shouldn't matter).
      */
     for (e=0; e<3; e++) ve[e]= EDGE_END2(vb,e);
      * We go round each triangle clockwise (although our surface is non-
      * orientable so it shouldn't matter).
      */
     for (e=0; e<3; e++) ve[e]= EDGE_END2(vb,e);
-    if (ve[0]>=0) {
-      if (ve[1]>=0) addtriangle(vb,ve[0],ve[1]);
-      if (ve[2]>=0) addtriangle(vb,ve[2],ve[0]);
+    if (ve[1]>=0) {
+      if (ve[0]>=0) addtriangle(vb,ve[0],ve[1]);
+      if (ve[2]>=0) addtriangle(vb,ve[1],ve[2]);
     }
   }
 }    
     }
   }
 }