# No. 146 (Brown 1868): "Continuous rotary motion of the disk produces reciprocating rectilinear motion of the yoke-bar, by means of the wrist or crank-pin on the disk working in the groove of the yoke. The groove may be so shaped as to obtain a uniform reciprocating rectilinear motion."
#
# Model (cm, no gravity; a plan): the disk (the one driven joint, 20 turns a minute, clockwise in the view) carries a crank-pin 6 cm from its centre. The pin works by real contact in an endless groove (1.44 cm wide, 1.2 mm clearance a side)
# cut in the yoke, whose bar slides to and fro 8 cm in fixed guides. The groove is the path of the pin in the yoke's own frame when the yoke goes uniformly, 4 cm each way, with the turns rounded (a plain slot would give the harmonic motion of No. 93).
# Generator: opencode-runs/batch10/gen146.py.
number: 146
slug: disk-crank-pin-yoke-groove
name: A crank-pin in a shaped groove giving the yoke uniform motion
brown: "Continuous rotary motion of the disk produces reciprocating rectilinear motion of the yoke-bar, by means of the wrist or crank-pin on the disk working in the groove of the yoke. The groove may be so shaped as to obtain a uniform reciprocating rectilinear motion."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  multiccd: true
  duration_s: 9.0
  floor: false
  gravity: 0
bodies:
  - id: crank
    shape: part
    pos: [0, 0, 0]
    mass: 1.0
    friction: 0.05
    color: "#d9cfb6"
    pieces:
      - {kind: rod, from: [0, 0.5, 0], to: [0, 3.0, 0], radius: 0.8, color: "#8f8a80"}   # the shaft
      - {kind: disc, center: [0, 0], radius: 8.2, y: [0.0, 0.5]}   # the disk, behind the yoke
      - {kind: rod, from: [6.0, 0.0, 0.0], to: [6.0, -1.3, 0.0], radius: 0.6, collide: 1, capsule: true, color: "#8f8a80"}   # the crank-pin
  - id: yoke
    shape: part
    pos: [3.9, 0, 0]
    mass: 0.6
    friction: 0.05
    color: "#b8ad97"
    pieces:
      - {kind: poly, points: [[2.4097, -2.2957], [2.4099, -2.5248], [2.4161, -2.7384], [2.4285, -2.9445], [2.4473, -3.1431], [2.4723, -3.3338], [2.5036, -3.5165], [2.5409, -3.6909], [2.5839, -3.8568], [2.6324, -4.0138], [2.6859, -4.1617], [2.7441, -4.3004], [2.8064, -4.4296], [2.8724, -4.5492], [2.9415, -4.6591], [3.0131, -4.7593], [3.0866, -4.8498], [3.1616, -4.9306], [3.2373, -5.0021], [3.3134, -5.0644], [3.3894, -5.1178], [3.4648, -5.1628], [3.5395, -5.1997], [3.6132, -5.2291], [3.6859, -5.2515], [3.7578, -5.2671], [3.8291, -5.2763], [3.9, -5.2793], [3.9709, -5.2763], [4.0422, -5.2671], [4.1141, -5.2515], [4.1868, -5.2291], [4.2605, -5.1997], [4.3352, -5.1628], [4.4106, -5.1178], [4.4866, -5.0644], [4.5627, -5.0021], [4.6384, -4.9306], [4.7134, -4.8498], [4.7869, -4.7593], [4.8585, -4.6591], [4.9276, -4.5492], [4.9936, -4.4296], [5.0559, -4.3004], [5.1141, -4.1617], [5.1676, -4.0138], [5.2161, -3.8568], [5.2591, -3.6909], [5.2964, -3.5165], [5.3277, -3.3338], [5.3527, -3.1431], [5.3715, -2.9445], [5.3839, -2.7384], [5.3901, -2.5248], [5.3904, -2.2957], [5.3904, 2.2957], [5.3901, 2.5248], [5.3839, 2.7384], [5.3715, 2.9445], [5.3527, 3.1431], [5.3277, 3.3338], [5.2964, 3.5165], [5.2591, 3.6909], [5.2161, 3.8568], [5.1676, 4.0138], [5.1141, 4.1617], [5.0559, 4.3004], [4.9936, 4.4296], [4.9276, 4.5492], [4.8585, 4.6591], [4.7869, 4.7593], [4.7134, 4.8498], [4.6384, 4.9306], [4.5627, 5.0021], [4.4866, 5.0644], [4.4106, 5.1178], [4.3352, 5.1628], [4.2605, 5.1997], [4.1868, 5.2291], [4.1141, 5.2515], [4.0422, 5.2671], [3.9709, 5.2763], [3.9, 5.2793], [3.8291, 5.2763], [3.7578, 5.2671], [3.6859, 5.2515], [3.6132, 5.2291], [3.5395, 5.1997], [3.4648, 5.1628], [3.3894, 5.1178], [3.3134, 5.0644], [3.2373, 5.0021], [3.1616, 4.9306], [3.0866, 4.8498], [3.0131, 4.7593], [2.9415, 4.6591], [2.8724, 4.5492], [2.8064, 4.4296], [2.7441, 4.3004], [2.6859, 4.1617], [2.6324, 4.0138], [2.5839, 3.8568], [2.5409, 3.6909], [2.5036, 3.5165], [2.4723, 3.3338], [2.4473, 3.1431], [2.4285, 2.9445], [2.4161, 2.7384], [2.4099, 2.5248], [2.4097, 2.2957]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9697, -2.2961], [0.9699, -2.5357], [-0.5299, -2.5583], [-0.5303, -2.2969]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9699, -2.5357], [0.9767, -2.7705], [-0.5218, -2.8374], [-0.5299, -2.5583]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9767, -2.7705], [0.9906, -3.0], [-0.505, -3.1156], [-0.5218, -2.8374]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9906, -3.0], [1.0117, -3.2238], [-0.4789, -3.392], [-0.505, -3.1156]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0117, -3.2238], [1.0403, -3.4415], [-0.4469, -3.637], [-0.4789, -3.392]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0403, -3.4415], [1.0648, -3.6278], [-0.4183, -3.8522], [-0.4469, -3.637]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0648, -3.6278], [1.1009, -3.8389], [-0.3721, -4.1223], [-0.4183, -3.8522]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1009, -3.8389], [1.1446, -4.0431], [-0.3151, -4.3884], [-0.3721, -4.1223]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1446, -4.0431], [1.1957, -4.2399], [-0.2473, -4.6497], [-0.3151, -4.3884]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1957, -4.2399], [1.2541, -4.429], [-0.1682, -4.9056], [-0.2473, -4.6497]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.2541, -4.429], [1.3196, -4.61], [-0.0789, -5.1524], [-0.1682, -4.9056]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.3196, -4.61], [1.3915, -4.7837], [0.007, -5.3608], [-0.0789, -5.1524]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.3915, -4.7837], [1.4639, -4.9563], [0.0963, -5.5724], [0.007, -5.3608]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.4639, -4.9563], [1.5429, -5.1201], [0.2102, -5.8084], [0.0963, -5.5724]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.5429, -5.1201], [1.6283, -5.2749], [0.336, -6.0365], [0.2102, -5.8084]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.6283, -5.2749], [1.7197, -5.4203], [0.4739, -6.2559], [0.336, -6.0365]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.7197, -5.4203], [1.8168, -5.5562], [0.6114, -6.449], [0.4739, -6.2559]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.8168, -5.5562], [1.9312, -5.7053], [0.7541, -6.6351], [0.6114, -6.449]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.9312, -5.7053], [2.0336, -5.8312], [0.9009, -6.8146], [0.7541, -6.6351]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.0336, -5.8312], [2.1408, -5.947], [1.0756, -7.003], [0.9009, -6.8146]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.1408, -5.947], [2.2527, -6.0524], [1.2625, -7.1792], [1.0756, -7.003]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.2527, -6.0524], [2.3686, -6.1473], [1.4369, -7.3228], [1.2625, -7.1792]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.3686, -6.1473], [2.5177, -6.2617], [1.6294, -7.4704], [1.4369, -7.3228]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.5177, -6.2617], [2.6373, -6.3458], [1.8211, -7.6043], [1.6294, -7.4704]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.6373, -6.3458], [2.7602, -6.4191], [2.0427, -7.7364], [1.8211, -7.6043]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.7602, -6.4191], [2.8858, -6.4813], [2.2657, -7.8471], [2.0427, -7.7364]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.8858, -6.4813], [3.0595, -6.5532], [2.4945, -7.9428], [2.2657, -7.8471]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.0595, -6.5532], [3.1875, -6.6043], [2.6893, -8.0192], [2.4945, -7.9428]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.1875, -6.6043], [3.3174, -6.6441], [2.9381, -8.0954], [2.6893, -8.0192]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.3174, -6.6441], [3.4487, -6.6726], [3.1915, -8.1504], [2.9381, -8.0954]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.4487, -6.6726], [3.635, -6.6972], [3.4408, -8.1845], [3.1915, -8.1504]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.635, -6.6972], [3.7673, -6.7143], [3.6386, -8.2088], [3.4408, -8.1845]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.7673, -6.7143], [3.9, -6.72], [3.9, -8.22], [3.6386, -8.2088]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.9, -6.72], [4.0327, -6.7143], [4.1614, -8.2088], [3.9, -8.22]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.0327, -6.7143], [4.165, -6.6972], [4.3592, -8.1845], [4.1614, -8.2088]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.165, -6.6972], [4.3513, -6.6726], [4.6085, -8.1504], [4.3592, -8.1845]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.3513, -6.6726], [4.4826, -6.6441], [4.8619, -8.0954], [4.6085, -8.1504]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.4826, -6.6441], [4.6125, -6.6043], [5.1107, -8.0192], [4.8619, -8.0954]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.6125, -6.6043], [4.7405, -6.5532], [5.3055, -7.9428], [5.1107, -8.0192]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.7405, -6.5532], [4.9142, -6.4813], [5.5343, -7.8471], [5.3055, -7.9428]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.9142, -6.4813], [5.0398, -6.4191], [5.7573, -7.7364], [5.5343, -7.8471]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.0398, -6.4191], [5.1627, -6.3458], [5.9789, -7.6043], [5.7573, -7.7364]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.1627, -6.3458], [5.2823, -6.2617], [6.1706, -7.4704], [5.9789, -7.6043]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.2823, -6.2617], [5.4314, -6.1473], [6.3631, -7.3228], [6.1706, -7.4704]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.4314, -6.1473], [5.5473, -6.0524], [6.5375, -7.1792], [6.3631, -7.3228]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.5473, -6.0524], [5.6592, -5.947], [6.7244, -7.003], [6.5375, -7.1792]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.6592, -5.947], [5.7664, -5.8312], [6.8991, -6.8146], [6.7244, -7.003]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.7664, -5.8312], [5.8688, -5.7053], [7.0459, -6.6351], [6.8991, -6.8146]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.8688, -5.7053], [5.9832, -5.5562], [7.1886, -6.449], [7.0459, -6.6351]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.9832, -5.5562], [6.0803, -5.4203], [7.3261, -6.2559], [7.1886, -6.449]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.0803, -5.4203], [6.1717, -5.2749], [7.464, -6.0365], [7.3261, -6.2559]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.1717, -5.2749], [6.2571, -5.1201], [7.5898, -5.8084], [7.464, -6.0365]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.2571, -5.1201], [6.3361, -4.9563], [7.7037, -5.5724], [7.5898, -5.8084]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.3361, -4.9563], [6.4085, -4.7837], [7.793, -5.3608], [7.7037, -5.5724]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.4085, -4.7837], [6.4804, -4.61], [7.8789, -5.1524], [7.793, -5.3608]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.4804, -4.61], [6.5459, -4.429], [7.9682, -4.9056], [7.8789, -5.1524]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.5459, -4.429], [6.6043, -4.2399], [8.0473, -4.6497], [7.9682, -4.9056]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6043, -4.2399], [6.6554, -4.0431], [8.1151, -4.3884], [8.0473, -4.6497]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6554, -4.0431], [6.6991, -3.8389], [8.1721, -4.1223], [8.1151, -4.3884]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6991, -3.8389], [6.7352, -3.6278], [8.2183, -3.8522], [8.1721, -4.1223]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7352, -3.6278], [6.7597, -3.4415], [8.2469, -3.637], [8.2183, -3.8522]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7597, -3.4415], [6.7883, -3.2238], [8.2789, -3.392], [8.2469, -3.637]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7883, -3.2238], [6.8094, -3.0], [8.305, -3.1156], [8.2789, -3.392]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8094, -3.0], [6.8233, -2.7705], [8.3218, -2.8374], [8.305, -3.1156]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8233, -2.7705], [6.8301, -2.5357], [8.3299, -2.5583], [8.3218, -2.8374]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8301, -2.5357], [6.8304, -2.2961], [8.3303, -2.2969], [8.3299, -2.5583]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8304, -2.2961], [6.8304, 2.2961], [8.3303, 2.2969], [8.3303, -2.2969]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8304, 2.2961], [6.8301, 2.5357], [8.3299, 2.5583], [8.3303, 2.2969]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8301, 2.5357], [6.8233, 2.7705], [8.3218, 2.8374], [8.3299, 2.5583]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8233, 2.7705], [6.8094, 3.0], [8.305, 3.1156], [8.3218, 2.8374]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.8094, 3.0], [6.7883, 3.2238], [8.2789, 3.392], [8.305, 3.1156]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7883, 3.2238], [6.7597, 3.4415], [8.2469, 3.637], [8.2789, 3.392]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7597, 3.4415], [6.7352, 3.6278], [8.2183, 3.8522], [8.2469, 3.637]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.7352, 3.6278], [6.6991, 3.8389], [8.1721, 4.1223], [8.2183, 3.8522]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6991, 3.8389], [6.6554, 4.0431], [8.1151, 4.3884], [8.1721, 4.1223]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6554, 4.0431], [6.6043, 4.2399], [8.0473, 4.6497], [8.1151, 4.3884]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.6043, 4.2399], [6.5459, 4.429], [7.9682, 4.9056], [8.0473, 4.6497]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.5459, 4.429], [6.4804, 4.61], [7.8789, 5.1524], [7.9682, 4.9056]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.4804, 4.61], [6.4085, 4.7837], [7.793, 5.3608], [7.8789, 5.1524]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.4085, 4.7837], [6.3361, 4.9563], [7.7037, 5.5724], [7.793, 5.3608]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.3361, 4.9563], [6.2571, 5.1201], [7.5898, 5.8084], [7.7037, 5.5724]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.2571, 5.1201], [6.1717, 5.2749], [7.464, 6.0365], [7.5898, 5.8084]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.1717, 5.2749], [6.0803, 5.4203], [7.3261, 6.2559], [7.464, 6.0365]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[6.0803, 5.4203], [5.9832, 5.5562], [7.1886, 6.449], [7.3261, 6.2559]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.9832, 5.5562], [5.8688, 5.7053], [7.0459, 6.6351], [7.1886, 6.449]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.8688, 5.7053], [5.7664, 5.8312], [6.8991, 6.8146], [7.0459, 6.6351]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.7664, 5.8312], [5.6592, 5.947], [6.7244, 7.003], [6.8991, 6.8146]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.6592, 5.947], [5.5473, 6.0524], [6.5375, 7.1792], [6.7244, 7.003]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.5473, 6.0524], [5.4314, 6.1473], [6.3631, 7.3228], [6.5375, 7.1792]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.4314, 6.1473], [5.2823, 6.2617], [6.1706, 7.4704], [6.3631, 7.3228]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.2823, 6.2617], [5.1627, 6.3458], [5.9789, 7.6043], [6.1706, 7.4704]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.1627, 6.3458], [5.0398, 6.4191], [5.7573, 7.7364], [5.9789, 7.6043]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[5.0398, 6.4191], [4.9142, 6.4813], [5.5343, 7.8471], [5.7573, 7.7364]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.9142, 6.4813], [4.7405, 6.5532], [5.3055, 7.9428], [5.5343, 7.8471]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.7405, 6.5532], [4.6125, 6.6043], [5.1107, 8.0192], [5.3055, 7.9428]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.6125, 6.6043], [4.4826, 6.6441], [4.8619, 8.0954], [5.1107, 8.0192]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.4826, 6.6441], [4.3513, 6.6726], [4.6085, 8.1504], [4.8619, 8.0954]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.3513, 6.6726], [4.165, 6.6972], [4.3592, 8.1845], [4.6085, 8.1504]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.165, 6.6972], [4.0327, 6.7143], [4.1614, 8.2088], [4.3592, 8.1845]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[4.0327, 6.7143], [3.9, 6.72], [3.9, 8.22], [4.1614, 8.2088]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.9, 6.72], [3.7673, 6.7143], [3.6386, 8.2088], [3.9, 8.22]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.7673, 6.7143], [3.635, 6.6972], [3.4408, 8.1845], [3.6386, 8.2088]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.635, 6.6972], [3.4487, 6.6726], [3.1915, 8.1504], [3.4408, 8.1845]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.4487, 6.6726], [3.3174, 6.6441], [2.9381, 8.0954], [3.1915, 8.1504]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.3174, 6.6441], [3.1875, 6.6043], [2.6893, 8.0192], [2.9381, 8.0954]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.1875, 6.6043], [3.0595, 6.5532], [2.4945, 7.9428], [2.6893, 8.0192]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[3.0595, 6.5532], [2.8858, 6.4813], [2.2657, 7.8471], [2.4945, 7.9428]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.8858, 6.4813], [2.7602, 6.4191], [2.0427, 7.7364], [2.2657, 7.8471]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.7602, 6.4191], [2.6373, 6.3458], [1.8211, 7.6043], [2.0427, 7.7364]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.6373, 6.3458], [2.5177, 6.2617], [1.6294, 7.4704], [1.8211, 7.6043]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.5177, 6.2617], [2.3686, 6.1473], [1.4369, 7.3228], [1.6294, 7.4704]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.3686, 6.1473], [2.2527, 6.0524], [1.2625, 7.1792], [1.4369, 7.3228]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.2527, 6.0524], [2.1408, 5.947], [1.0756, 7.003], [1.2625, 7.1792]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.1408, 5.947], [2.0336, 5.8312], [0.9009, 6.8146], [1.0756, 7.003]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[2.0336, 5.8312], [1.9312, 5.7053], [0.7541, 6.6351], [0.9009, 6.8146]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.9312, 5.7053], [1.8168, 5.5562], [0.6114, 6.449], [0.7541, 6.6351]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.8168, 5.5562], [1.7197, 5.4203], [0.4739, 6.2559], [0.6114, 6.449]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.7197, 5.4203], [1.6283, 5.2749], [0.336, 6.0365], [0.4739, 6.2559]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.6283, 5.2749], [1.5429, 5.1201], [0.2102, 5.8084], [0.336, 6.0365]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.5429, 5.1201], [1.4639, 4.9563], [0.0963, 5.5724], [0.2102, 5.8084]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.4639, 4.9563], [1.3915, 4.7837], [0.007, 5.3608], [0.0963, 5.5724]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.3915, 4.7837], [1.3196, 4.61], [-0.0789, 5.1524], [0.007, 5.3608]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.3196, 4.61], [1.2541, 4.429], [-0.1682, 4.9056], [-0.0789, 5.1524]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.2541, 4.429], [1.1957, 4.2399], [-0.2473, 4.6497], [-0.1682, 4.9056]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1957, 4.2399], [1.1446, 4.0431], [-0.3151, 4.3884], [-0.2473, 4.6497]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1446, 4.0431], [1.1009, 3.8389], [-0.3721, 4.1223], [-0.3151, 4.3884]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.1009, 3.8389], [1.0648, 3.6278], [-0.4183, 3.8522], [-0.3721, 4.1223]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0648, 3.6278], [1.0403, 3.4415], [-0.4469, 3.637], [-0.4183, 3.8522]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0403, 3.4415], [1.0117, 3.2238], [-0.4789, 3.392], [-0.4469, 3.637]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[1.0117, 3.2238], [0.9906, 3.0], [-0.505, 3.1156], [-0.4789, 3.392]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9906, 3.0], [0.9767, 2.7705], [-0.5218, 2.8374], [-0.505, 3.1156]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9767, 2.7705], [0.9699, 2.5357], [-0.5299, 2.5583], [-0.5218, 2.8374]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9699, 2.5357], [0.9697, 2.2961], [-0.5303, 2.2969], [-0.5299, 2.5583]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[0.9697, 2.2961], [0.9697, -2.2961], [-0.5303, -2.2969], [-0.5303, 2.2969]], y: [-1.2, -0.1], collide: 2}
      - {kind: poly, points: [[-0.5303, 7.02], [8.3303, 7.02], [8.3303, 8.82], [-0.5303, 8.82]], y: [-1.2, -0.1], collide: 0}   # the head of the yoke
      - {kind: rod, from: [-8.0, -0.65, 7.92], to: [15.8, -0.65, 7.92], radius: 0.55, collide: 0, color: "#a89a7e"}   # the yoke-bar
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: poly, points: [[-1.4, -15.0], [1.4, -15.0], [1.0, 0], [-1.0, 0]], y: [1.8, 2.8]}   # the shaft's standard, behind
      - {kind: poly, points: [[-14.4, 6.02], [-12.4, 6.02], [-12.4, 9.82], [-14.4, 9.82]], y: [-1.7, 0.4], collide: 0}   # the guide at the left
      - {kind: poly, points: [[12.4, 6.02], [14.4, 6.02], [14.4, 9.82], [12.4, 9.82]], y: [-1.7, 0.4], collide: 0}   # and at the right
      - {kind: poly, points: [[-14.4, 9.82], [14.4, 9.82], [14.4, 10.82], [-14.4, 10.82]], y: [-1.7, 0.4], collide: 0}
      - {kind: poly, points: [[-14.4, -15.0], [-13.4, -15.0], [-13.4, 10.82], [-14.4, 10.82]], y: [1.0, 1.8], collide: 0}   # the posts, behind
      - {kind: poly, points: [[13.4, -15.0], [14.4, -15.0], [14.4, 10.82], [13.4, 10.82]], y: [1.0, 1.8], collide: 0}
      - {kind: poly, points: [[-16.4, -16.0], [16.4, -16.0], [16.4, -15.0], [-16.4, -15.0]], y: [-3, 3], collide: 0, color: "#b9b09c"}
joints:
  - {id: j_s, type: hinge, body: crank, axis: [0, 1, 0], damping: 0.002}   # the one driven joint; + : clockwise
  - {id: j_u, type: slide, body: yoke, axis: [1, 0, 0], damping: 0.05}   # the yoke-bar in its guides; + : to the right
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_s, kind: velocity, rpm: 20, kv: 20.0, max_torque: 20}
checks:
  - {type: follow, out: j_u, in: j_s, expect: -0.0284, tol: 0.0023, min_r2: 0.99, settle_s: 0.37, window_s: 0.3333}
  - {type: follow, out: j_u, in: j_s, expect: 0.0284, tol: 0.0023, min_r2: 0.99, settle_s: 1.87, window_s: 0.3333}
  - {type: follow, out: j_u, in: j_s, expect: -0.0284, tol: 0.0023, min_r2: 0.99, settle_s: 3.37, window_s: 0.3333}
  - {type: follow, out: j_u, in: j_s, expect: 0.0284, tol: 0.0023, min_r2: 0.99, settle_s: 4.87, window_s: 0.3333}
  - {type: position, joint: j_u, min: -8.1, max: 0.3, settle_s: 0.0, window_s: 8.5}
camera: {target: [0, 0, -4.0], position: [0, -76.0, -4.0], fov: 34}
display:
  output: j_u
  labels: {j_s: "Disk (driver)", j_u: "Yoke-bar"}
  proof: {label: "Pin out of contact", sub: "the disk turns but the yoke-bar stands"}

