chiark / gitweb /
visual: debugging with one in darker blue
[moebius3.git] / visual
diff --git a/visual b/visual
index 490a4b96252f4fecf90a7e220f3b11991527fd49..64d4b6cb41c603ca762eb77d40cf93ccda71bdd7 100755 (executable)
--- a/visual
+++ b/visual
@@ -17,7 +17,7 @@ scene.fov = 1E-3
 from moebius import *
 from moedebug import *
 
-nv = 40
+nv = 20
 nw = 40
 
 class Visdebug(BaseVisdebug):
@@ -27,14 +27,14 @@ class Visdebug(BaseVisdebug):
     #dbg('Visdebug', ps)
     curve(pos = ps, color=color)
   def circle(vd, c, axis, **kw):
-    ring(pos=c, axis=axis, radius=0.25, thickness=0.005, **kw)
+    ring(pos=c, axis=axis, radius=np.linalg.norm(axis), thickness=0.005, **kw)
   def arrow(vd, p, d, **kw):
     print('arrow %s' % repr(kw), file=sys.stderr)
     bodge_color = kw.get('color', (1,0,0))
     try: del kw['color']
     except KeyError: pass
     vd.line(p, p+d, color=bodge_color, **kw)
-    vd.circle(p, d, color=bodge_color, **kw)
+    vd.circle(p, np.asarray(d) * 0.25, color=bodge_color, **kw)
   def crashing(vd, msg):
     print("CRASHING - VISDEBUG", msg, file=sys.stderr)
     rate(1E-8)
@@ -53,8 +53,10 @@ ws = range(0, nw+1)
 #c0 = curve( color=color.red, pos = [ m.edge.point(th) for th in thetas ] )
 #c1 = curve( color=color.blue, pos = [ m.midline.point(th) for th in thetas ] )
 
-for v in vs:
-  c2 = curve( color=color.blue, pos = [ m.point(v,w) for w in ws ] )
+for vi in range(0, len(vs)):
+  v= vs[vi]
+  c2 = curve( color= (color.blue if vi == int(2*nv/3) else (0,0,0.5)),
+              pos = [ m.point(v,w) for w in ws ] )
 
 #for w in ws:
 #  c3 = curve( color=color.blue, pos = [ m.point(v,w) for v in vs ] )