teapot works again
[anneal.git] / src / Main.java
index e97f975..8a6cde6 100644 (file)
@@ -121,18 +121,18 @@ public class Main implements GLEventListener {
         //mtf.move(geom.new V(0, (float)-0.05, (float)0.05));
         mtf.move(geom.new V(0, (float)-0.05, (float)0.00));
 
-        /*
 
+        /*
         for(int i=0; i<stlf.coordArray.length; i+=3) {
             Geom.P p0 = geom.newP(stlf.coordArray[i+0].x * MAG, stlf.coordArray[i+0].y * MAG, stlf.coordArray[i+0].z * MAG);
             Geom.P p1 = geom.newP(stlf.coordArray[i+1].x * MAG, stlf.coordArray[i+1].y * MAG, stlf.coordArray[i+1].z * MAG);
             Geom.P p2 = geom.newP(stlf.coordArray[i+2].x * MAG, stlf.coordArray[i+2].y * MAG, stlf.coordArray[i+2].z * MAG);
             Geom.V n  = geom.new V(stlf.normArray[i/3].x * MAG, stlf.normArray[i/3].y  * MAG, stlf.normArray[i/3].z * MAG);
-            Geom.T t  = geom.newT(geom.newE(p0, p1), geom.newE(p1, p2), geom.newE(p2, p0), n);
+            Geom.T t  = geom.newT(p0, p1, p2, n);
         }
-
         */
 
+
     }
 
     /**
@@ -217,17 +217,18 @@ public class Main implements GLEventListener {
             Geom.P centroid = t.centroid();
             gl.glBegin(GL.GL_LINES);
             gl.glColor3f(1, 1, 1);
-
+            /*
             centroid.glVertex(gl);
             centroid.plus(t.norm().times(t.diameter())).glVertex(gl);
-            /*
+            */
+
             t.p1().glVertex(gl);
             t.p1().plus(t.p1().norm().times(t.diameter())).glVertex(gl);
             t.p2().glVertex(gl);
             t.p2().plus(t.p2().norm().times(t.diameter())).glVertex(gl);
             t.p3().glVertex(gl);
             t.p3().plus(t.p3().norm().times(t.diameter())).glVertex(gl);
-            */
+
             gl.glEnd();
 
         }