chiark / gitweb /
mesh: much better, still not Valid
[moebius3.git] / visual
1 #!/usr/bin/python
2
3 import signal
4 signal.signal(signal.SIGINT, signal.SIG_DFL)
5
6 from visual import *
7 from bezier import BezierSegment
8 import numpy as np
9
10 from moebius import *
11
12 nv = 40
13 nw = 40
14
15 m = Moebius(nv, nw)
16
17 vs = range(0, nv+1)
18 ws = range(0, nw+1)
19
20 #ts = np.linspace(0, 1, 40)
21
22 #thetas = np.linspace(0, tau, 40)
23 #c0 = curve( color=color.red, pos = [ m.edge.point(th) for th in thetas ] )
24 #c1 = curve( color=color.blue, pos = [ m.midline.point(th) for th in thetas ] )
25
26 for v in vs:
27   c2 = curve( pos = [ m.point(v,w) for w in ws ] )
28
29 for w in ws:
30   c3 = curve( color=color.yellow, pos = [ m.point(v,w) for v in vs ] )
31
32
33 for v in vs:
34   c4 = curve( color=color.blue,
35               pos = [ m.point_offset(v,w, 0.1) for w in ws ] )
36
37 for w in ws:
38   c3 = curve( color=(1,0,1), pos = [ m.point_offset(v,w, -0.1) for v in vs ] )
39