+
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
from visual import *
from bezier import BezierSegment
-from moebius import Moebius
import numpy as np
+from moebius import *
+
n_u = 10
m = Moebius(10)
ts = arange(0, 1, 0.1)
-for ix_u in range(0, n_u+1):
- curve( pos = [ m.point(ix_u, t) for t in ts ] )
+thetas = arange(0, tau, 20)
+
+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 ix_u in range(0, n_u):
+ c2 = curve( pos = [ m.point(ix_u, t) for t in ts ] )
+from __future__ import print_function
+
import numpy as np
from numpy import cos, sin
from bezier import BezierSegment
+import sys
+
tau = np.pi * 2
origin = np.array((0,0,0))
def radius(pc, theta):
return pc._r0 * cos(theta) + pc._r1 * sin(theta)
def point(pc, theta):
+ print('point %s %f' % (pc, theta), file=sys.stderr)
return pc._c + pc.radius(theta)
class Twirler(ParametricCircle):