chiark / gitweb /
Twirler; add extra_zeta
[moebius3.git] / check.py
1
2 import signal
3 signal.signal(signal.SIGINT, signal.SIG_DFL)
4
5 from visual import *
6 from bezier import BezierSegment
7 import numpy as np
8
9 from moebius import *
10
11 n_u = 40
12
13 m = Moebius(n_u)
14
15 ts = np.linspace(0, 1, 40)
16
17 thetas = np.linspace(0, tau, 40)
18
19 c0 = curve( color=color.red, pos = [ m.edge.point(th) for th in thetas ] )
20 c1 = curve( color=color.blue, pos = [ m.midline.point(th) for th in thetas ] )
21
22 for ix_u in range(0, n_u):
23   c2 = curve( pos = [ m.point(ix_u, t) for t in ts ] )
24
25 for t in ts:
26   c3 = curve( color=color.yellow, pos = [ m.point(ix_u, t)
27                                           for ix_u in range(0, n_u+1) ] )