chiark / gitweb /
more debugging
[moebius3.git] / visual
diff --git a/visual b/visual
index 8cf167af9421e716081a8d37730a6d9d4e57e3bb..90ad5c3bdbfe99281bf69f94553eaab142701c95 100755 (executable)
--- a/visual
+++ b/visual
@@ -21,7 +21,11 @@ class Visdebug():
     # fn(t) => 3-tuple, 3-list, or similar, for t \elem [0,1]
     ps = [ fn(t) for t in np.linspace(0,1,11) ]
     #dbg('Visdebug', ps)
-    curve(pos = ps)
+    curve(pos = ps, color=color.yellow)
+  def line(vd, p0, p1):
+    vd.curve(lambda t: p0 + t * (p1-p0))
+  def arrow(vd, p, d):
+    vd.line(p, p+d)
   def crashing(vd, msg):
     print("CRASHING - VISDEBUG", msg, file=sys.stderr)
     rate(1E-8)
@@ -41,10 +45,10 @@ ws = range(0, nw+1)
 #c1 = curve( color=color.blue, pos = [ m.midline.point(th) for th in thetas ] )
 
 for v in vs:
-  c2 = curve( pos = [ m.point(v,w) for w in ws ] )
+  c2 = curve( color=color.blue, pos = [ m.point(v,w) for w in ws ] )
 
-for w in ws:
-  c3 = curve( color=color.yellow, pos = [ m.point(v,w) for v in vs ] )
+#for w in ws:
+#  c3 = curve( color=color.blue, pos = [ m.point(v,w) for v in vs ] )
 
 
 #for v in vs: