thetas = np.linspace(0, tau, 20)
-c0 = curve( color=color.blue, pos = [ m.edge.point(th) for th in thetas ] )
-c1 = curve( color=color.red, pos = [ m.midline.point(th) for th in thetas ] )
+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 ] )
return cos(zeta) * r + sin(zeta) * tw._axis
class Moebius:
- def __init__(m, n_u): # ix_u will be in [0, n_u>
- m.edge = Twirler(origin, unit_z, unit_x, 2, 0)
- m.midline = Twirler(-unit_z, unit_z, unit_y, 1, 0)
- m._beziers = [ m._bezier(u) for u in np.linspace(0, 1, n_u) ]
+ def __init__(m, n_u): # ix_u will be in [0, n_u] for [0, 1]
+ m.edge = Twirler(origin, unit_z, unit_x, -2, tau/2)
+ m.midline = Twirler(-unit_z, unit_z, unit_y, -0.5, 0)
+ m._beziers = [ m._bezier(u) for u in np.linspace(0, 1, n_u+1) ]
def _bezier(m,u):
theta = u * tau
cp = [None] * 4