# No. 397 (Brown 1868): "Continuous circular into intermittent rectilinear reciprocating. A motion used on several sewing machines for driving the
# shuttle. Same motion applied to three-revolution cylinder printing-presses."
#
# Model (cm, Brown's view): a lever pivoted at the foot, with a curved slot; the crank (the one driven joint, 24 rpm) carries a pin in the slot.
# The slot's middle is an arc of the pin's own circle about the crank shaft (with the lever upright), so while the pin runs through that part the
# lever stands still (the dwell, a quarter turn of the crank); through the rest of the turn the slot's straight ends make the pin swing the lever
# out and back. A link from the lever's top eye drives the table to and fro. Contact only: the pin against the slot's walls.
# Generator: opencode-runs/batch13/gen397.py.
number: 397
slug: shuttle-dwell-lever
name: Continuous circular into intermittent rectilinear reciprocating
brown: "Continuous circular into intermittent rectilinear reciprocating. A motion used on several sewing machines for driving the shuttle. Same motion applied to three-revolution cylinder printing-presses."
units: cm
sim: {timestep: 0.0005, integrator: implicitfast, iterations: 60, solver: PGS, duration_s: 10, floor: false}
bodies:
  - id: crank
    shape: part
    pos: [6.0, 0, 17.5]
    density: 7800
    color: "#b8ad97"
    pieces:
      - {kind: disc, center: [6.0, 17.5], radius: 3.2, inner: 0.8, y: [-2.6, -1.4]}   # its boss
      - {kind: rod, from: [6.0, -2.0, 17.5], to: [-1.6324, -2.0, 22.2693], radius: 1.1}   # its arm
      - {kind: rod, from: [-1.6324, -1.9, 22.2693], to: [-1.6324, 0.9, 22.2693], radius: 0.6, collide: 1, capsule: true, color: "#6f6a60"}   # the crank pin
      - {kind: rod, from: [6.0, -1.4, 17.5], to: [6.0, 4.0, 17.5], radius: 0.7, color: "#6f6a60"}   # the shaft
  - id: lever
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#c9bfa8"
    pieces:
      - {kind: poly, points: [[1.6994, 8.4854], [1.3163, 8.8068], [0.8021, 8.1939], [1.1851, 7.8725]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.3163, 8.8068], [0.9333, 9.1282], [0.4191, 8.5153], [0.8021, 8.1939]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.9333, 9.1282], [0.5503, 9.4496], [0.0361, 8.8367], [0.4191, 8.5153]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.5503, 9.4496], [0.1673, 9.771], [-0.347, 9.1581], [0.0361, 8.8367]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.1673, 9.771], [-0.2293, 10.104], [-0.7597, 9.5051], [-0.347, 9.1581]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.2293, 10.104], [-0.8377, 10.6623], [-1.4034, 10.0966], [-0.7597, 9.5051]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.8377, 10.6623], [-1.4076, 11.2842], [-2.0205, 10.77], [-1.4034, 10.0966]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.4076, 11.2842], [-1.9212, 11.9535], [-2.5765, 11.4947], [-2.0205, 10.77]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.9212, 11.9535], [-2.3745, 12.665], [-3.0673, 12.265], [-2.5765, 11.4947]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-2.3745, 12.665], [-2.764, 13.4133], [-3.489, 13.0752], [-3.0673, 12.265]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-2.764, 13.4133], [-3.0868, 14.1927], [-3.8386, 13.919], [-3.489, 13.0752]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.0868, 14.1927], [-3.3405, 14.9972], [-4.1132, 14.7902], [-3.8386, 13.919]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.3405, 14.9972], [-3.5231, 15.8208], [-4.3109, 15.6819], [-4.1132, 14.7902]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.5231, 15.8208], [-3.6332, 16.6572], [-4.4302, 16.5875], [-4.3109, 15.6819]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.6332, 16.6572], [-3.67, 17.5], [-4.47, 17.5], [-4.4302, 16.5875]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.67, 17.5], [-3.6332, 18.3428], [-4.4302, 18.4125], [-4.47, 17.5]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.6332, 18.3428], [-3.5231, 19.1792], [-4.3109, 19.3181], [-4.4302, 18.4125]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.5231, 19.1792], [-3.3405, 20.0028], [-4.1132, 20.2098], [-4.3109, 19.3181]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.3405, 20.0028], [-3.0868, 20.8073], [-3.8386, 21.081], [-4.1132, 20.2098]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-3.0868, 20.8073], [-2.764, 21.5867], [-3.489, 21.9248], [-3.8386, 21.081]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-2.764, 21.5867], [-2.3745, 22.335], [-3.0673, 22.735], [-3.489, 21.9248]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-2.3745, 22.335], [-1.9212, 23.0465], [-2.5765, 23.5053], [-3.0673, 22.735]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.9212, 23.0465], [-1.4158, 23.7058], [-2.0384, 24.2082], [-2.5765, 23.5053]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.4158, 23.7058], [-0.7649, 24.4818], [-1.3777, 24.996], [-2.0384, 24.2082]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.7649, 24.4818], [-0.1221, 25.2478], [-0.7349, 25.7621], [-1.3777, 24.996]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.1221, 25.2478], [0.5207, 26.0139], [-0.0921, 26.5281], [-0.7349, 25.7621]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.5207, 26.0139], [1.1635, 26.7799], [0.5507, 27.2942], [-0.0921, 26.5281]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.1635, 26.7799], [1.8063, 27.546], [1.1935, 28.0602], [0.5507, 27.2942]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.8063, 27.546], [2.4491, 28.312], [1.8362, 28.8263], [1.1935, 28.0602]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[2.4491, 28.312], [3.0919, 29.0781], [2.479, 29.5923], [1.8362, 28.8263]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[3.0749, 10.1247], [2.6919, 10.4461], [2.1777, 9.8333], [2.5607, 9.5119]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[2.6919, 10.4461], [2.3089, 10.7675], [1.7946, 10.1547], [2.1777, 9.8333]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[2.3089, 10.7675], [1.9259, 11.0889], [1.4116, 10.4761], [1.7946, 10.1547]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.9259, 11.0889], [1.5428, 11.4103], [1.0286, 10.7975], [1.4116, 10.4761]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.5428, 11.4103], [1.1895, 11.7061], [0.6591, 11.1072], [1.0286, 10.7975]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.1895, 11.7061], [0.6755, 12.1755], [0.1098, 11.6098], [0.6591, 11.1072]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.6755, 12.1755], [0.2317, 12.6598], [-0.3812, 12.1456], [0.1098, 11.6098]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.2317, 12.6598], [-0.1682, 13.181], [-0.8235, 12.7221], [-0.3812, 12.1456]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.1682, 13.181], [-0.5212, 13.735], [-1.214, 13.335], [-0.8235, 12.7221]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.5212, 13.735], [-0.8245, 14.3177], [-1.5495, 13.9796], [-1.214, 13.335]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.8245, 14.3177], [-1.0759, 14.9246], [-1.8276, 14.651], [-1.5495, 13.9796]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.0759, 14.9246], [-1.2734, 15.5511], [-2.0462, 15.344], [-1.8276, 14.651]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.2734, 15.5511], [-1.4156, 16.1924], [-2.2034, 16.0535], [-2.0462, 15.344]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.4156, 16.1924], [-1.5013, 16.8437], [-2.2983, 16.774], [-2.2034, 16.0535]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.5013, 16.8437], [-1.53, 17.5], [-2.33, 17.5], [-2.2983, 16.774]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.53, 17.5], [-1.5013, 18.1563], [-2.2983, 18.226], [-2.33, 17.5]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.5013, 18.1563], [-1.4156, 18.8076], [-2.2034, 18.9465], [-2.2983, 18.226]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.4156, 18.8076], [-1.2734, 19.4489], [-2.0462, 19.656], [-2.2034, 18.9465]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.2734, 19.4489], [-1.0759, 20.0754], [-1.8276, 20.349], [-2.0462, 19.656]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-1.0759, 20.0754], [-0.8245, 20.6823], [-1.5495, 21.0204], [-1.8276, 20.349]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.8245, 20.6823], [-0.5212, 21.265], [-1.214, 21.665], [-1.5495, 21.0204]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.5212, 21.265], [-0.1682, 21.819], [-0.8235, 22.2779], [-1.214, 21.665]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[-0.1682, 21.819], [0.2496, 22.362], [-0.373, 22.8643], [-0.8235, 22.2779]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.2496, 22.362], [0.8745, 23.1062], [0.2616, 23.6205], [-0.373, 22.8643]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[0.8745, 23.1062], [1.5173, 23.8723], [0.9044, 24.3865], [0.2616, 23.6205]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[1.5173, 23.8723], [2.16, 24.6383], [1.5472, 25.1526], [0.9044, 24.3865]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[2.16, 24.6383], [2.8028, 25.4044], [2.19, 25.9186], [1.5472, 25.1526]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[2.8028, 25.4044], [3.4456, 26.1704], [2.8328, 26.6846], [2.19, 25.9186]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[3.4456, 26.1704], [4.0884, 26.9365], [3.4756, 27.4507], [2.8328, 26.6846]], y: [-1.0, 1.0]}
      - {kind: poly, points: [[4.0884, 26.9365], [4.7312, 27.7025], [4.1184, 28.2167], [3.4756, 27.4507]], y: [-1.0, 1.0]}
      - {kind: rod, from: [1.4422, -0.5, 8.179], to: [1.0592, -0.5, 8.5004], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.4422, 0.5, 8.179], to: [1.0592, 0.5, 8.5004], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.0592, -0.5, 8.5004], to: [0.6762, -0.5, 8.8218], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.0592, 0.5, 8.5004], to: [0.6762, 0.5, 8.8218], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.6762, -0.5, 8.8218], to: [0.2932, -0.5, 9.1431], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.6762, 0.5, 8.8218], to: [0.2932, 0.5, 9.1431], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.2932, -0.5, 9.1431], to: [-0.0898, -0.5, 9.4645], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.2932, 0.5, 9.1431], to: [-0.0898, 0.5, 9.4645], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0898, -0.5, 9.4645], to: [-0.4945, -0.5, 9.8046], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0898, 0.5, 9.4645], to: [-0.4945, 0.5, 9.8046], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4945, -0.5, 9.8046], to: [-1.1206, -0.5, 10.3794], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4945, 0.5, 9.8046], to: [-1.1206, 0.5, 10.3794], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.1206, -0.5, 10.3794], to: [-1.7141, -0.5, 11.0271], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.1206, 0.5, 10.3794], to: [-1.7141, 0.5, 11.0271], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.7141, -0.5, 11.0271], to: [-2.2489, -0.5, 11.7241], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.7141, 0.5, 11.0271], to: [-2.2489, 0.5, 11.7241], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.2489, -0.5, 11.7241], to: [-2.7209, -0.5, 12.465], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.2489, 0.5, 11.7241], to: [-2.7209, 0.5, 12.465], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.7209, -0.5, 12.465], to: [-3.1265, -0.5, 13.2442], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.7209, 0.5, 12.465], to: [-3.1265, 0.5, 13.2442], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.1265, -0.5, 13.2442], to: [-3.4627, -0.5, 14.0559], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.1265, 0.5, 13.2442], to: [-3.4627, 0.5, 14.0559], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.4627, -0.5, 14.0559], to: [-3.7269, -0.5, 14.8937], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.4627, 0.5, 14.0559], to: [-3.7269, 0.5, 14.8937], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.7269, -0.5, 14.8937], to: [-3.917, -0.5, 15.7514], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.7269, 0.5, 14.8937], to: [-3.917, 0.5, 15.7514], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.917, -0.5, 15.7514], to: [-4.0317, -0.5, 16.6223], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.917, 0.5, 15.7514], to: [-4.0317, 0.5, 16.6223], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.0317, -0.5, 16.6223], to: [-4.07, -0.5, 17.5], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.0317, 0.5, 16.6223], to: [-4.07, 0.5, 17.5], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.07, -0.5, 17.5], to: [-4.0317, -0.5, 18.3777], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.07, 0.5, 17.5], to: [-4.0317, 0.5, 18.3777], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.0317, -0.5, 18.3777], to: [-3.917, -0.5, 19.2486], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-4.0317, 0.5, 18.3777], to: [-3.917, 0.5, 19.2486], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.917, -0.5, 19.2486], to: [-3.7269, -0.5, 20.1063], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.917, 0.5, 19.2486], to: [-3.7269, 0.5, 20.1063], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.7269, -0.5, 20.1063], to: [-3.4627, -0.5, 20.9441], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.7269, 0.5, 20.1063], to: [-3.4627, 0.5, 20.9441], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.4627, -0.5, 20.9441], to: [-3.1265, -0.5, 21.7558], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.4627, 0.5, 20.9441], to: [-3.1265, 0.5, 21.7558], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.1265, -0.5, 21.7558], to: [-2.7209, -0.5, 22.535], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-3.1265, 0.5, 21.7558], to: [-2.7209, 0.5, 22.535], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.7209, -0.5, 22.535], to: [-2.2489, -0.5, 23.2759], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.7209, 0.5, 22.535], to: [-2.2489, 0.5, 23.2759], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.2489, -0.5, 23.2759], to: [-1.7271, -0.5, 23.957], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-2.2489, 0.5, 23.2759], to: [-1.7271, 0.5, 23.957], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.7271, -0.5, 23.957], to: [-1.0713, -0.5, 24.7389], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.7271, 0.5, 23.957], to: [-1.0713, 0.5, 24.7389], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.0713, -0.5, 24.7389], to: [-0.4285, -0.5, 25.505], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.0713, 0.5, 24.7389], to: [-0.4285, 0.5, 25.505], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4285, -0.5, 25.505], to: [0.2143, -0.5, 26.271], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4285, 0.5, 25.505], to: [0.2143, 0.5, 26.271], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.2143, -0.5, 26.271], to: [0.8571, -0.5, 27.037], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.2143, 0.5, 26.271], to: [0.8571, 0.5, 27.037], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.8571, -0.5, 27.037], to: [1.4999, -0.5, 27.8031], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.8571, 0.5, 27.037], to: [1.4999, 0.5, 27.8031], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.4999, -0.5, 27.8031], to: [2.1427, -0.5, 28.5691], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.4999, 0.5, 27.8031], to: [2.1427, 0.5, 28.5691], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.1427, -0.5, 28.5691], to: [2.7854, -0.5, 29.3352], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.1427, 0.5, 28.5691], to: [2.7854, 0.5, 29.3352], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.8178, -0.5, 9.8183], to: [2.4348, -0.5, 10.1397], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.8178, 0.5, 9.8183], to: [2.4348, 0.5, 10.1397], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.4348, -0.5, 10.1397], to: [2.0518, -0.5, 10.4611], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.4348, 0.5, 10.1397], to: [2.0518, 0.5, 10.4611], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.0518, -0.5, 10.4611], to: [1.6687, -0.5, 10.7825], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.0518, 0.5, 10.4611], to: [1.6687, 0.5, 10.7825], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.6687, -0.5, 10.7825], to: [1.2857, -0.5, 11.1039], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.6687, 0.5, 10.7825], to: [1.2857, 0.5, 11.1039], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.2857, -0.5, 11.1039], to: [0.9243, -0.5, 11.4066], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.2857, 0.5, 11.1039], to: [0.9243, 0.5, 11.4066], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.9243, -0.5, 11.4066], to: [0.3926, -0.5, 11.8926], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.9243, 0.5, 11.4066], to: [0.3926, 0.5, 11.8926], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.3926, -0.5, 11.8926], to: [-0.0747, -0.5, 12.4027], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.3926, 0.5, 11.8926], to: [-0.0747, 0.5, 12.4027], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0747, -0.5, 12.4027], to: [-0.4959, -0.5, 12.9515], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0747, 0.5, 12.4027], to: [-0.4959, 0.5, 12.9515], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4959, -0.5, 12.9515], to: [-0.8676, -0.5, 13.535], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4959, 0.5, 12.9515], to: [-0.8676, 0.5, 13.535], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.8676, -0.5, 13.535], to: [-1.187, -0.5, 14.1486], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.8676, 0.5, 13.535], to: [-1.187, 0.5, 14.1486], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.187, -0.5, 14.1486], to: [-1.4518, -0.5, 14.7878], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.187, 0.5, 14.1486], to: [-1.4518, 0.5, 14.7878], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.4518, -0.5, 14.7878], to: [-1.6598, -0.5, 15.4476], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.4518, 0.5, 14.7878], to: [-1.6598, 0.5, 15.4476], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.6598, -0.5, 15.4476], to: [-1.8095, -0.5, 16.123], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.6598, 0.5, 15.4476], to: [-1.8095, 0.5, 16.123], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8095, -0.5, 16.123], to: [-1.8998, -0.5, 16.8089], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8095, 0.5, 16.123], to: [-1.8998, 0.5, 16.8089], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8998, -0.5, 16.8089], to: [-1.93, -0.5, 17.5], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8998, 0.5, 16.8089], to: [-1.93, 0.5, 17.5], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.93, -0.5, 17.5], to: [-1.8998, -0.5, 18.1911], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.93, 0.5, 17.5], to: [-1.8998, 0.5, 18.1911], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8998, -0.5, 18.1911], to: [-1.8095, -0.5, 18.877], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8998, 0.5, 18.1911], to: [-1.8095, 0.5, 18.877], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8095, -0.5, 18.877], to: [-1.6598, -0.5, 19.5524], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.8095, 0.5, 18.877], to: [-1.6598, 0.5, 19.5524], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.6598, -0.5, 19.5524], to: [-1.4518, -0.5, 20.2122], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.6598, 0.5, 19.5524], to: [-1.4518, 0.5, 20.2122], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.4518, -0.5, 20.2122], to: [-1.187, -0.5, 20.8514], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.4518, 0.5, 20.2122], to: [-1.187, 0.5, 20.8514], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.187, -0.5, 20.8514], to: [-0.8676, -0.5, 21.465], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-1.187, 0.5, 20.8514], to: [-0.8676, 0.5, 21.465], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.8676, -0.5, 21.465], to: [-0.4959, -0.5, 22.0485], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.8676, 0.5, 21.465], to: [-0.4959, 0.5, 22.0485], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4959, -0.5, 22.0485], to: [-0.0617, -0.5, 22.6132], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.4959, 0.5, 22.0485], to: [-0.0617, 0.5, 22.6132], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0617, -0.5, 22.6132], to: [0.5681, -0.5, 23.3634], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [-0.0617, 0.5, 22.6132], to: [0.5681, 0.5, 23.3634], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.5681, -0.5, 23.3634], to: [1.2108, -0.5, 24.1294], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [0.5681, 0.5, 23.3634], to: [1.2108, 0.5, 24.1294], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.2108, -0.5, 24.1294], to: [1.8536, -0.5, 24.8954], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.2108, 0.5, 24.1294], to: [1.8536, 0.5, 24.8954], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.8536, -0.5, 24.8954], to: [2.4964, -0.5, 25.6615], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [1.8536, 0.5, 24.8954], to: [2.4964, 0.5, 25.6615], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.4964, -0.5, 25.6615], to: [3.1392, -0.5, 26.4275], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [2.4964, 0.5, 25.6615], to: [3.1392, 0.5, 26.4275], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [3.1392, -0.5, 26.4275], to: [3.782, -0.5, 27.1936], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [3.1392, 0.5, 26.4275], to: [3.782, 0.5, 27.1936], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [3.782, -0.5, 27.1936], to: [4.4248, -0.5, 27.9596], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: rod, from: [3.782, 0.5, 27.1936], to: [4.4248, 0.5, 27.9596], radius: 0.4, collide: 2, capsule: true, color: "#c9bfa8"}
      - {kind: poly, points: [[0.7995, 7.4129], [0.4164, 7.7343], [3.0776, 10.9057], [3.4606, 10.5843]], y: [1.0, 1.6]}
      - {kind: poly, points: [[0.4164, 7.7343], [0.0334, 8.0557], [2.6945, 11.2271], [3.0776, 10.9057]], y: [1.0, 1.6]}
      - {kind: poly, points: [[0.0334, 8.0557], [-0.3496, 8.3771], [2.3115, 11.5485], [2.6945, 11.2271]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-0.3496, 8.3771], [-0.7326, 8.6985], [1.9285, 11.8699], [2.3115, 11.5485]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-0.7326, 8.6985], [-1.1575, 9.0559], [1.5873, 12.1553], [1.9285, 11.8699]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-1.1575, 9.0559], [-1.8277, 9.6723], [1.0998, 12.5998], [1.5873, 12.1553]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-1.8277, 9.6723], [-2.4801, 10.3843], [0.6913, 13.0455], [1.0998, 12.5998]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-2.4801, 10.3843], [-3.068, 11.1505], [0.3233, 13.5251], [0.6913, 13.0455]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-3.068, 11.1505], [-3.5869, 11.965], [-0.0016, 14.035], [0.3233, 13.5251]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-3.5869, 11.965], [-4.0328, 12.8216], [-0.2807, 14.5713], [-0.0016, 14.035]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.0328, 12.8216], [-4.4024, 13.7138], [-0.5121, 15.1298], [-0.2807, 14.5713]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.4024, 13.7138], [-4.6928, 14.6349], [-0.6939, 15.7064], [-0.5121, 15.1298]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.6928, 14.6349], [-4.9018, 15.5777], [-0.8247, 16.2966], [-0.6939, 15.7064]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.9018, 15.5777], [-5.0279, 16.5352], [-0.9036, 16.896], [-0.8247, 16.2966]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-5.0279, 16.5352], [-5.07, 17.5], [-0.93, 17.5], [-0.9036, 16.896]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-5.07, 17.5], [-5.0279, 18.4648], [-0.9036, 18.104], [-0.93, 17.5]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-5.0279, 18.4648], [-4.9018, 19.4223], [-0.8247, 18.7034], [-0.9036, 18.104]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.9018, 19.4223], [-4.6928, 20.3651], [-0.6939, 19.2936], [-0.8247, 18.7034]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.6928, 20.3651], [-4.4024, 21.2862], [-0.5121, 19.8702], [-0.6939, 19.2936]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.4024, 21.2862], [-4.0328, 22.1784], [-0.2807, 20.4287], [-0.5121, 19.8702]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-4.0328, 22.1784], [-3.5869, 23.035], [-0.0016, 20.965], [-0.2807, 20.4287]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-3.5869, 23.035], [-3.068, 23.8495], [0.3233, 21.4749], [-0.0016, 20.965]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-3.068, 23.8495], [-2.5054, 24.585], [0.7166, 21.9852], [0.3233, 21.4749]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-2.5054, 24.585], [-1.8373, 25.3817], [1.3341, 22.7206], [0.7166, 21.9852]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-1.8373, 25.3817], [-1.1945, 26.1477], [1.9769, 23.4866], [1.3341, 22.7206]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-1.1945, 26.1477], [-0.5517, 26.9138], [2.6197, 24.2527], [1.9769, 23.4866]], y: [1.0, 1.6]}
      - {kind: poly, points: [[-0.5517, 26.9138], [0.091, 27.6798], [3.2625, 25.0187], [2.6197, 24.2527]], y: [1.0, 1.6]}
      - {kind: poly, points: [[0.091, 27.6798], [0.7338, 28.4459], [3.9053, 25.7847], [3.2625, 25.0187]], y: [1.0, 1.6]}
      - {kind: poly, points: [[0.7338, 28.4459], [1.3766, 29.2119], [4.548, 26.5508], [3.9053, 25.7847]], y: [1.0, 1.6]}
      - {kind: poly, points: [[1.3766, 29.2119], [2.0194, 29.978], [5.1908, 27.3168], [4.548, 26.5508]], y: [1.0, 1.6]}
      - {kind: rod, from: [0, 1.3, 0], to: [2.13, 1.3, 8.9986], radius: 1.3}   # the foot arm
      - {kind: rod, from: [3.6051, 1.3, 28.6474], to: [0, 1.3, 32.0], radius: 1.3}   # the top arm
      - {kind: disc, center: [0, 0], radius: 2.0, inner: 0.6, y: [-0.4, 1.6]}   # the foot eye
      - {kind: disc, center: [0, 32.0], radius: 1.8, inner: 0.5, y: [0.4, 1.6]}   # the top eye
  - id: link
    shape: part
    pos: [0, 0, 32.0]
    mount: lever
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: rod, from: [0, -0.2, 32.0], to: [-17.0, -0.2, 32.0], radius: 0.6}
      - {kind: disc, center: [0, 32.0], radius: 1.3, inner: 0.4, y: [-0.6, 0.2]}
      - {kind: disc, center: [-17.0, 32.0], radius: 1.3, inner: 0.4, y: [-0.6, 0.2]}
  - id: table
    shape: part
    pos: [0, 0, 35.0]
    density: 2000
    color: "#d9cfb6"
    pieces:
      - {kind: poly, points: [[-21, 34.4], [22, 34.4], [22, 35.6], [-21, 35.6]], y: [-3.0, 3.0]}   # the table (the shuttle's carrier)
      - {kind: poly, points: [[-18.2, 32.0], [-15.8, 32.0], [-15.8, 34.4], [-18.2, 34.4]], y: [0.4, 1.4]}   # its eye's lug
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-6, -4.5], [8, -4.5], [8, -3.0], [-6, -3.0]], y: [-3, 3]}   # the floor
      - {kind: poly, points: [[-1.8, -3.0], [1.8, -3.0], [1.2, 0], [-1.2, 0]], y: [1.6, 2.6]}   # the foot's bearing
      - {kind: rod, from: [0, -0.4, 0], to: [0, 2.6, 0], radius: 0.6}   # its pin
      - {kind: rod, from: [-24, 3.4, 36.2], to: [56, 3.4, 36.2], radius: 0.4}   # the table's guide (behind)
      - {kind: rod, from: [-24, 3.4, 33.8], to: [56, 3.4, 33.8], radius: 0.4}
joints:
  - {id: j_c, type: hinge, body: crank, axis: [0, 1, 0], damping: 0.01}   # the crank: the one driven joint
  - {id: j_l, type: hinge, body: lever, axis: [0, 1, 0], damping: 0.02, range: [-0.15, 1.2]}   # the lever; + : its top to the right
  - {id: j_lk, type: hinge, body: link, axis: [0, 1, 0], damping: 0.001}
  - {id: j_x, type: slide, body: table, axis: [1, 0, 0], damping: 0.05}   # the table; + : to the right
pins:
  - {id: p_tab, a: link, b: table, at: [-17.0, 0, 32.0]}
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.001], margin: 0}
driver: {joint: j_c, kind: velocity, rpm: 24, kv: 20, max_torque: 50}
checks:
  - {type: position, joint: j_l, min: -0.02, max: 0.02, settle_s: 2.0, window_s: 0.5}   # the dwell: the pin runs through the arc, the lever stands
  - {type: position, joint: j_l, min: -0.02, max: 0.02, settle_s: 4.5, window_s: 0.5}
  - {type: position, joint: j_x, min: -0.3, max: 0.3, settle_s: 2.0, window_s: 0.5}   # the table stands with it (cm)
  - {type: amplitude, joint: j_x, min: 0.17, max: 0.2, settle_s: 0.5, window_s: 7.5}   # and travels its 36 cm out and back each turn
  - {type: penetration, max: 0.002, settle_s: 0.5}
camera: {target: [13, 0, 10], position: [13, -115, 10], fov: 34}
display:
  output: j_x
  labels: {j_c: "Crank (driver)", j_l: "Slotted lever", j_x: "Table"}
