nw = 40
class Visdebug(BaseVisdebug):
- def curve(vd, fn, colour=color.yellow):
+ def curve(vd, fn, color=color.yellow):
# 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, color=colour)
+ curve(pos = ps, color=color)
def arrow(vd, p, d, **kw):
- vd.line(p, p+d, **kw)
- ring(pos=p, axis=d, radius=0.25, thickness=0.005, **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)
+ ring(pos=p, axis=d, radius=0.25, thickness=0.005, color=bodge_color, **kw)
def crashing(vd, msg):
print("CRASHING - VISDEBUG", msg, file=sys.stderr)
rate(1E-8)