def __init__(self, l=1.1, r=1, z=-0.25, v=3, dt_trans=0.203, dalpha=np.deg2rad(16), eps_l=0.33): c1, c2 = np.array([-l, 0, z]), np.array([l, 0, z]) circle1 = pmt.Circle(c2, r, v, -np.pi / 2 + dalpha, np.pi - 2 * dalpha) circle2 = pmt.Circle(c1, r, v, np.pi / 2 + dalpha, np.pi - 2 * dalpha) l1s, l1e = np.array([-l + eps_l, -r, z]), np.array([l - eps_l, -r, z]) line1 = pmt.Line(l1s, l1e, v) l2s, l2e = np.array([l - eps_l, r, z]), np.array([-l + eps_l, r, z]) line2 = pmt.Line(l2s, l2e, v) trans1 = pmt.SmoothLine(line1.get(line1.duration), circle1.get(0), duration=dt_trans) trans2 = pmt.SmoothLine(circle1.get(circle1.duration), line2.get(0), duration=dt_trans) trans3 = pmt.SmoothLine(line2.get(line2.duration), circle2.get(0), duration=dt_trans) trans4 = pmt.SmoothLine(circle2.get(circle2.duration), line1.get(0), duration=dt_trans) steps = [ line1, trans1, circle1, trans2, line2, trans3, circle2, trans4 ] pmt.CompositeTraj.__init__(self, steps)
def traj5(): r, v = 1., 4. om = v / r return pmt.Circle(c=[0, 0, -0.5], r=1., v=4., alpha0=0., dalpha=2 * np.pi, psit=pmt.SinOne(om=om))
def __init__(self, l=1., r=1, z=-0.25, v=3): c1, c2 = np.array([-l, 0, z]), np.array([l, 0, z]) p1, p2 = np.array([-l, -r, z]), np.array([l, -r, z]) eps_l, eps_alpha = 0.5, np.deg2rad(10) p1bis, p2bis = np.array([-l+eps_l, -r, z]), np.array([l-eps_l, -r, z]) p3, p4 = np.array([l, r, z]), np.array([-l, r, z]) circle1 = pmt.Circle(c2, r, v, -np.pi/2, np.pi) line1 = pmt.Line(p1bis, p2bis, v) circle2 = pmt.Circle(c1, r, v, np.pi/2, np.pi) Y0 = circle2.get(circle2.duration) Y1 = circle1.get(0) Y2 = circle1.get(circle1.duration) Y3 = circle2.get(0) steps = [#pmt.SmoothLine(circle2.get(circle2.duration), line1.get(0), duration=0.16), #line1, #pmt.SmoothLine(line1.get(line1.duration), Y1, duration=0.16), pmt.SmoothLine(Y0, Y1, duration=0.7), circle1, pmt.SmoothLine(Y2, Y3, duration=0.7), circle2] pmt.CompositeTraj.__init__(self, steps)
def traj2(): return pmt.Circle([0, 0, -0.5], r=1., v=1.)
def traj4(): return pmt.Circle([0, 0, -0.5], r=2., v=1.)
def traj3(): return pmt.Circle([0, 0, -0.5], r=1., v=4.)