X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=project.c;h=1ce6db66d492867a869ed833b2a9e9c6931067a8;hp=266237f90b222be270b723c5845007ff85330e36;hb=2a4bf2376456c0650ffea5d89e4b4cf4763af1ad;hpb=83051837693783280938bf36e9e43c7687736753 diff --git a/project.c b/project.c index 266237f..1ce6db6 100644 --- a/project.c +++ b/project.c @@ -63,14 +63,14 @@ static void generate_display_list(void) { 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); - 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]); } } }