| 92 | t = t + step |
| 93 | |
| 94 | def Spaceout(): |
| 95 | global points |
| 96 | newpoints = [] |
| 97 | L = len(points) |
| 98 | if lOpen: |
| 99 | newpoints.append(points[0]) |
| 100 | knot = StandardKnot() |
| 101 | if len(knot) == 0: |
| 102 | return |
| 103 | for t in range( 1, L - m + 2): |
| 104 | p = P(t - 0.5,knot,Nopen) |
| 105 | x = points[t][0] - p[0] |
| 106 | y = points[t][1] - p[1] |
| 107 | newpoints.append([points[t][0] + x,points[t][1] + y]) |
| 108 | newpoints.append(points[-1]) |
| 109 | else: |
| 110 | knot = range(L) |
| 111 | for t in range(L): |
| 112 | p = P(mod(t + 1.5,L),knot,Nclosed) |
| 113 | x = points[t][0] - p[0] |
| 114 | y = points[t][1] - p[1] |
| 115 | newpoints.append([points[t][0] + x,points[t][1] + y]) |
| 116 | points = newpoints |
| 117 | plot() |
| 118 | |
| 119 | def do_mouse(eventname): |
| 120 | def mouse_binding(event): |