+
+class Moebius(MoebiusHalf):
+ def __init__(m, nv, nw):
+ '''
+ 0 <= v <= nw along the extent, v=0 is the flat traverse
+ 0 <= w <= nv across the traverse nw must be even
+ the top is both v=0, w=0 v=nv, w=nw
+ '''
+ assert(nw % 1 == 0)
+ m.nv = nv
+ m.nw = nw
+ m.nt = nw/2
+ m._t_vals = np.linspace(0, 1, m.nt+1)
+ MoebiusHalf.__init__(m, nu=nv*2)
+
+ def _vw2tiu_kw(m, v, w):
+ if w <= m.nt:
+ it = w
+ iu = v
+ else:
+ it = m.nw - w
+ iu = m.nv + v
+ print('v,w=%d,%d => it,iu=%d,%d' % (v,w,it,iu),
+ file=sys.stderr)
+ return { 't': m._t_vals[it], 'iu': iu }
+
+ def point(m, v, w):
+ return MoebiusHalf.point(m, **m._vw2tiu_kw(v,w))