12 def __init__(pc, c, r0, r1):
13 ''' circle centred on c
14 with theta=0 point at c+r0
15 and with theta=tau/4 point at c+r1 '''
19 pc._axis = np.cross(r0, r1)
21 return pc._c + pc._r0 * cos(theta) + pc._r1 * sin(theta)
23 def Twirler(ParametricCircle):
24 def __init__(tw, c, r0, r1, cycles, begin):
25 ''' circle centred on c, etc.
26 but with an orientation at each point, orthogonal to
29 ParametricCircle.__init__(tw, c, r0, r1)
35 m._edge = ParametricCircle(origin, unit_z, unit_x)
36 m._midline = ParametricCircle(-unit_z, unit_z, unit_y)
37 m._beziers = [ self._bezier(u) for u in np.linspace(0, 1, n_u) ]
40 cp0 = m._edge.point(theta)
41 cp3 = m._midline.point(theta*2)