# No. 70 (Brown 1868): intermittent rotary motion by a tappet and studs, the driver's rim the stop.
#
# As drawn (cm; the drawing plane is x-z, depth y, C in front): C at the right (the one motor-driven shaft,
# turning against the clock) is a hub and three spokes carrying a rim, a ring 0.3 thick standing out from the
# spokes toward A, and inside it the tappet B. A at the left (behind) has 12 studs on its face reaching into
# the rim's depth. Between strokes two of A's studs bear on the rim's exterior (0.02 clear) and the stud between
# them stands inside the rim: A cannot turn. An opening in the rim, the tappet opposite its middle, lets the
# inside stud out as the tappet pushes it and the next stud in; the opening's ends then set A to the pitch.
# The opening is generated by sweeping the studs along A's motion. Generator: opencode-runs/batch8/gen070.py.
number: 70
slug: tappet-rim-stop-studs
name: Intermittent motion by a tappet and studs, the driver's rim a stop
brown: "The driving-wheel, C, has a rim, shown in dotted outline, the exterior of which serves as a bearing and stop for the studs on the other wheel, A, when the tappet, B, is out of contact with the studs. An opening in this rim serves to allow one stud to pass in and another to pass out. The tappet is opposite the middle of this opening."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  multiccd: false
  duration_s: 24
  floor: false
bodies:
  - id: wheel_a
    shape: part
    pos: [-5.5, 0, 0]
    friction: 0.1
    color: "#e4d9bf"
    pieces:
      - {kind: disc, center: [-5.5, 0], radius: 4.8, y: [1.6, 2.4]}   # A
      - {kind: disc, center: [-5.5, 0], radius: 0.9, y: [2.4, 3.2], color: "#8f8a80"}
      # its 12 studs
      - {kind: rod, from: [-1.3, 1.6, 0.0], to: [-1.3, -0.9, 0.0], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-1.8627, 1.6, 2.1], to: [-1.8627, -0.9, 2.1], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-3.4, 1.6, 3.6373], to: [-3.4, -0.9, 3.6373], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-5.5, 1.6, 4.2], to: [-5.5, -0.9, 4.2], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-7.6, 1.6, 3.6373], to: [-7.6, -0.9, 3.6373], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-9.1373, 1.6, 2.1], to: [-9.1373, -0.9, 2.1], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-9.7, 1.6, 0.0], to: [-9.7, -0.9, 0.0], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-9.1373, 1.6, -2.1], to: [-9.1373, -0.9, -2.1], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-7.6, 1.6, -3.6373], to: [-7.6, -0.9, -3.6373], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-5.5, 1.6, -4.2], to: [-5.5, -0.9, -4.2], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-3.4, 1.6, -3.6373], to: [-3.4, -0.9, -3.6373], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
      - {kind: rod, from: [-1.8627, 1.6, -2.1], to: [-1.8627, -0.9, -2.1], radius: 0.35, capsule: true, collide: 2, color: "#6b5a44"}
  - id: wheel_c
    shape: part
    pos: [2.1962, 0, 0]
    friction: 0.1
    color: "#e8dec6"
    pieces:
      - {kind: disc, center: [2.1962, 0], radius: 0.9, y: [-1.6, -1.0], color: "#8f8a80"}   # C's hub
      - {kind: rod, from: [2.1962, -1.3, 0], to: [-1.8538, -1.3, 0.0], radius: 0.25, color: "#cfc4ad"}
      - {kind: rod, from: [2.1962, -1.3, 0], to: [4.2212, -1.3, -3.5074], radius: 0.25, color: "#cfc4ad"}
      - {kind: rod, from: [2.1962, -1.3, 0], to: [4.2212, -1.3, 3.5074], radius: 0.25, color: "#cfc4ad"}
      # its rim, with the opening
      - {kind: poly, points: [[6.1161, -0.0274], [6.3761, -0.0292], [6.3956, 0.0733], [6.3726, 0.175], [6.1128, 0.1642], [6.0956, 0.0681]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.1147, 0.1095], [6.3746, 0.1167], [6.3905, 0.2198], [6.3639, 0.3207], [6.1047, 0.3007], [6.0909, 0.2041]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.1085, 0.2461], [6.368, 0.2625], [6.3803, 0.3661], [6.3502, 0.4659], [6.0918, 0.437], [6.0814, 0.3399]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0975, 0.3825], [6.3563, 0.4079], [6.3649, 0.5119], [6.3314, 0.6106], [6.0742, 0.5726], [6.0672, 0.4753]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0818, 0.5184], [6.3395, 0.5528], [6.3445, 0.657], [6.3076, 0.7546], [6.0518, 0.7076], [6.0482, 0.6101]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0613, 0.6537], [6.3177, 0.6971], [6.3191, 0.8014], [6.2787, 0.8976], [6.0248, 0.8418], [6.0246, 0.7442]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0362, 0.7882], [6.2909, 0.8405], [6.2886, 0.9448], [6.2449, 1.0395], [5.9931, 0.9749], [5.9963, 0.8773]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0063, 0.9218], [6.259, 0.9829], [6.2531, 1.087], [6.2062, 1.1802], [5.9567, 1.1068], [5.9633, 1.0094]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.9718, 1.0542], [6.2223, 1.1241], [6.2127, 1.228], [6.1625, 1.3194], [5.9158, 1.2373], [5.9258, 1.1402]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.9327, 1.1853], [6.1806, 1.2639], [6.1674, 1.3674], [6.1141, 1.457], [5.8704, 1.3664], [5.8838, 1.2697]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.8891, 1.315], [6.134, 1.4022], [6.1173, 1.5051], [6.0608, 1.5929], [5.8205, 1.4938], [5.8372, 1.3976]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.841, 1.443], [6.0827, 1.5388], [6.0624, 1.6411], [6.0029, 1.7268], [5.7661, 1.6194], [5.7862, 1.5239]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.7884, 1.5694], [6.0266, 1.6735], [6.0027, 1.775], [5.9403, 1.8586], [5.7074, 1.743], [5.7308, 1.6482]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.7314, 1.6938], [5.9659, 1.8061], [5.9385, 1.9068], [5.8732, 1.9881], [5.6445, 1.8644], [5.6712, 1.7706]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.6702, 1.8161], [5.9006, 1.9366], [5.8696, 2.0362], [5.7929, 2.1102], [5.5773, 1.9837], [5.6073, 1.8908]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.6047, 1.9363], [5.822, 2.0597], [5.7706, 2.1477], [5.7002, 2.2237], [5.506, 2.1004], [5.5392, 2.0086]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.535, 2.054], [5.7309, 2.1745], [5.6935, 2.2711], [5.6205, 2.3446], [5.4307, 2.2147], [5.4671, 2.1241]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.4613, 2.1693], [5.6529, 2.2966], [5.6121, 2.3918], [5.5365, 2.4627], [5.3514, 2.3262], [5.3909, 2.2369]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.3836, 2.2819], [5.5706, 2.4158], [5.5265, 2.5096], [5.4486, 2.5778], [5.2683, 2.4349], [5.3109, 2.3471]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.302, 2.3918], [5.4842, 2.5321], [5.4369, 2.6243], [5.3566, 2.6897], [5.1815, 2.5406], [5.2271, 2.4543]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.2166, 2.4987], [5.3939, 2.6453], [5.3434, 2.7358], [5.2608, 2.7984], [5.091, 2.6433], [5.1396, 2.5586]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.1276, 2.6026], [5.2996, 2.7553], [5.246, 2.8439], [5.1613, 2.9036], [4.997, 2.7427], [5.0485, 2.6598]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.035, 2.7033], [5.2015, 2.8619], [5.1449, 2.9486], [5.0582, 3.0053], [4.8995, 2.8388], [4.954, 2.7577]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.9389, 2.8007], [5.0998, 2.9651], [5.047, 3.0571], [4.9582, 3.1108], [4.7988, 2.9314], [4.856, 2.8523]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.8395, 2.8947], [5.0013, 3.072], [4.9386, 3.1547], [4.8479, 3.2053], [4.6949, 3.0204], [4.7549, 2.9434]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.7369, 2.9852], [4.8924, 3.168], [4.8268, 3.2485], [4.7344, 3.2959], [4.588, 3.1058], [4.6506, 3.0309]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.6311, 3.0721], [4.7802, 3.2602], [4.7118, 3.3383], [4.6179, 3.3825], [4.4782, 3.1874], [4.5433, 3.1147]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.5224, 3.1552], [4.6649, 3.3484], [4.5938, 3.4241], [4.4983, 3.465], [4.3655, 3.2651], [4.4332, 3.1947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.4109, 3.2344], [4.5465, 3.4325], [4.4728, 3.5056], [4.376, 3.5432], [4.2503, 3.3388], [4.3203, 3.2708]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.2967, 3.3098], [4.4253, 3.5124], [4.3491, 3.583], [4.256, 3.6258], [4.1325, 3.4084], [4.2049, 3.343]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.1799, 3.3811], [4.3064, 3.5967], [4.2276, 3.6647], [4.1282, 3.6955], [4.0124, 3.4739], [4.087, 3.411]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.0607, 3.4482], [4.1796, 3.6681], [4.0848, 3.7066], [3.9635, 3.6885], [3.89, 3.5352], [3.9668, 3.4749]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.9392, 3.5112], [4.0148, 3.6635], [3.9163, 3.6887], [3.8096, 3.6929], [3.7656, 3.5921], [3.8444, 3.5346]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.8156, 3.5699], [3.861, 3.6701], [3.7787, 3.728], [3.6835, 3.7563], [3.6393, 3.6447], [3.7201, 3.59]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.69, 3.6242], [3.7358, 3.7352], [3.6548, 3.7997], [3.5615, 3.8342], [3.5112, 3.6929], [3.5939, 3.641]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.5626, 3.6741], [3.6149, 3.8147], [3.5343, 3.8861], [3.442, 3.9271], [3.3815, 3.7365], [3.466, 3.6875]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.4336, 3.7196], [3.4967, 3.9094], [3.4154, 3.9878], [3.3203, 4.026], [3.2504, 3.7756], [3.3365, 3.7296]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.303, 3.7605], [3.3764, 4.0099], [3.2833, 4.0569], [3.1791, 4.0628], [3.118, 3.8101], [3.2056, 3.7671]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.1711, 3.7968], [3.2358, 4.0487], [3.141, 4.0924], [3.0367, 4.0946], [2.9845, 3.8399], [3.0735, 3.8]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.038, 3.8286], [3.0938, 4.0825], [2.9976, 4.1228], [2.8933, 4.1215], [2.85, 3.8651], [2.9404, 3.8283]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.9039, 3.8556], [2.9508, 4.1113], [2.8533, 4.1483], [2.7491, 4.1433], [2.7147, 3.8856], [2.8063, 3.852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.7689, 3.8779], [2.8069, 4.1352], [2.7081, 4.1687], [2.6041, 4.1601], [2.5788, 3.9013], [2.6715, 3.8709]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.6332, 3.8956], [2.6622, 4.1539], [2.5605, 4.1641], [2.4568, 4.1418], [2.4424, 3.9123], [2.5361, 3.8852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.497, 3.9084], [2.5146, 4.1378], [2.4145, 4.1643], [2.3121, 4.1484], [2.3057, 3.9185], [2.4003, 3.8947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.3604, 3.9166], [2.37, 4.1464], [2.2397, 4.1498], [2.2382, 4.0098]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.0109, 3.7365], [0.9837, 3.8223], [0.8777, 3.8294], [0.7775, 3.8147], [0.8298, 3.6741], [0.9265, 3.6875]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.8813, 3.6929], [0.8309, 3.8342], [0.7126, 3.865], [0.6224, 3.8184], [0.7024, 3.6242], [0.7986, 3.641]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.7532, 3.6447], [0.6759, 3.84], [0.5747, 3.8201], [0.4901, 3.7611], [0.5769, 3.5699], [0.6724, 3.59]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.6269, 3.5921], [0.5428, 3.7846], [0.4424, 3.7612], [0.3777, 3.6635], [0.4533, 3.5112], [0.548, 3.5346]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.5025, 3.5352], [0.429, 3.6885], [0.353, 3.6175], [0.289, 3.5274], [0.3318, 3.4482], [0.4257, 3.4749]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.7059, 2.65], [-0.8905, 2.8186], [-0.9735, 2.7554], [-1.0245, 2.6644], [-0.8242, 2.4987], [-0.7471, 2.5586]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.789, 2.5406], [-0.987, 2.7091], [-1.0678, 2.6431], [-1.1155, 2.5504], [-0.9095, 2.3918], [-0.8346, 2.4543]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.8758, 2.4349], [-1.0796, 2.5964], [-1.158, 2.5276], [-1.2025, 2.4333], [-0.9911, 2.2819], [-0.9184, 2.3471]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.9589, 2.3262], [-1.1682, 2.4805], [-1.2442, 2.409], [-1.2854, 2.3132], [-1.0688, 2.1693], [-0.9985, 2.2369]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.0382, 2.2147], [-1.2527, 2.3616], [-1.3262, 2.2875], [-1.364, 2.1903], [-1.1425, 2.054], [-1.0746, 2.1241]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.1135, 2.1004], [-1.3331, 2.2398], [-1.4039, 2.1632], [-1.4383, 2.0647], [-1.2122, 1.9363], [-1.1467, 2.0086]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.1848, 1.9837], [-1.4091, 2.1152], [-1.4772, 2.0362], [-1.5081, 1.9366], [-1.2777, 1.8161], [-1.2148, 1.8908]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.252, 1.8644], [-1.4807, 1.9881], [-1.5193, 1.8931], [-1.4923, 1.7672], [-1.3389, 1.6938], [-1.2787, 1.7706]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.315, 1.743], [-1.4672, 1.8186], [-1.4834, 1.7158], [-1.4875, 1.6094], [-1.3959, 1.5694], [-1.3384, 1.6482]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.3736, 1.6194], [-1.4647, 1.6607], [-1.5134, 1.5746], [-1.5322, 1.4762], [-1.4485, 1.443], [-1.3937, 1.5239]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.428, 1.4938], [-1.5112, 1.5281], [-1.5661, 1.4442], [-1.5814, 1.3452], [-1.4966, 1.315], [-1.4447, 1.3976]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.4779, 1.3664], [-1.5623, 1.3978], [-1.6237, 1.3153], [-1.6451, 1.2186], [-1.5403, 1.1853], [-1.4913, 1.2697]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.5234, 1.2373], [-1.6277, 1.2721], [-1.7151, 1.1958], [-1.7816, 1.1106], [-1.5794, 1.0542], [-1.5334, 1.1402]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.5643, 1.1068], [-1.7657, 1.1661], [-1.8607, 1.087], [-1.8666, 0.9829], [-1.6139, 0.9218], [-1.5709, 1.0094]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6006, 0.9749], [-1.8524, 1.0395], [-1.8961, 0.9448], [-1.8984, 0.8405], [-1.6437, 0.7882], [-1.6038, 0.8773]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6323, 0.8418], [-1.8863, 0.8976], [-1.9266, 0.8014], [-1.9252, 0.6971], [-1.6689, 0.6537], [-1.6321, 0.7442]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6594, 0.7076], [-1.9151, 0.7546], [-1.9521, 0.657], [-1.947, 0.5528], [-1.6893, 0.5184], [-1.6557, 0.6101]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6817, 0.5726], [-1.9389, 0.6106], [-1.9725, 0.5119], [-1.9638, 0.4079], [-1.7051, 0.3825], [-1.6747, 0.4753]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6993, 0.437], [-1.9577, 0.4659], [-1.9878, 0.3661], [-1.9755, 0.2625], [-1.716, 0.2461], [-1.6889, 0.3399]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.7122, 0.3007], [-1.9714, 0.3207], [-1.998, 0.2198], [-1.9821, 0.1167], [-1.7222, 0.1095], [-1.6984, 0.2041]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.7203, 0.1642], [-1.9801, 0.175], [-2.0031, 0.0733], [-1.9837, -0.0292], [-1.7237, -0.0274], [-1.7032, 0.0681]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.7237, 0.0274], [-1.9837, 0.0292], [-2.0031, -0.0733], [-1.9801, -0.175], [-1.7203, -0.1642], [-1.7032, -0.0681]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.7222, -0.1095], [-1.9821, -0.1167], [-1.998, -0.2198], [-1.9714, -0.3207], [-1.7122, -0.3007], [-1.6984, -0.2041]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.716, -0.2461], [-1.9755, -0.2625], [-1.9878, -0.3661], [-1.9577, -0.4659], [-1.6993, -0.437], [-1.6889, -0.3399]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.7051, -0.3825], [-1.9638, -0.4079], [-1.9725, -0.5119], [-1.9389, -0.6106], [-1.6817, -0.5726], [-1.6747, -0.4753]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6893, -0.5184], [-1.947, -0.5528], [-1.9521, -0.657], [-1.9151, -0.7546], [-1.6594, -0.7076], [-1.6557, -0.6101]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6689, -0.6537], [-1.9252, -0.6971], [-1.9266, -0.8014], [-1.8863, -0.8976], [-1.6323, -0.8418], [-1.6321, -0.7442]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6437, -0.7882], [-1.8984, -0.8405], [-1.8961, -0.9448], [-1.8524, -1.0395], [-1.6006, -0.9749], [-1.6038, -0.8773]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.6139, -0.9218], [-1.8666, -0.9829], [-1.8607, -1.087], [-1.8137, -1.1802], [-1.5643, -1.1068], [-1.5709, -1.0094]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.5794, -1.0542], [-1.8298, -1.1241], [-1.8202, -1.228], [-1.7701, -1.3194], [-1.5234, -1.2373], [-1.5334, -1.1402]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.5403, -1.1853], [-1.7881, -1.2639], [-1.7749, -1.3674], [-1.7216, -1.457], [-1.4779, -1.3664], [-1.4913, -1.2697]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.4966, -1.315], [-1.7416, -1.4022], [-1.7248, -1.5051], [-1.6684, -1.5929], [-1.428, -1.4938], [-1.4447, -1.3976]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.4485, -1.443], [-1.6902, -1.5388], [-1.6699, -1.6411], [-1.6104, -1.7268], [-1.3736, -1.6194], [-1.3937, -1.5239]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.3959, -1.5694], [-1.6342, -1.6735], [-1.6103, -1.775], [-1.5478, -1.8586], [-1.315, -1.743], [-1.3384, -1.6482]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.3389, -1.6938], [-1.5734, -1.8061], [-1.546, -1.9068], [-1.4807, -1.9881], [-1.252, -1.8644], [-1.2787, -1.7706]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.2777, -1.8161], [-1.5081, -1.9366], [-1.4772, -2.0362], [-1.4091, -2.1152], [-1.1848, -1.9837], [-1.2148, -1.8908]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.2122, -1.9363], [-1.4383, -2.0647], [-1.4039, -2.1632], [-1.3331, -2.2398], [-1.1135, -2.1004], [-1.1467, -2.0086]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.1425, -2.054], [-1.364, -2.1903], [-1.3262, -2.2875], [-1.2527, -2.3616], [-1.0382, -2.2147], [-1.0746, -2.1241]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-1.0688, -2.1693], [-1.2854, -2.3132], [-1.2442, -2.409], [-1.1682, -2.4805], [-0.9589, -2.3262], [-0.9985, -2.2369]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.9911, -2.2819], [-1.2025, -2.4333], [-1.158, -2.5276], [-1.0796, -2.5964], [-0.8758, -2.4349], [-0.9184, -2.3471]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.9095, -2.3918], [-1.1155, -2.5504], [-1.0678, -2.6431], [-0.987, -2.7091], [-0.789, -2.5406], [-0.8346, -2.4543]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.8242, -2.4987], [-1.0245, -2.6644], [-0.9735, -2.7554], [-0.8905, -2.8186], [-0.6985, -2.6433], [-0.7471, -2.5586]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.7351, -2.6026], [-0.9296, -2.7752], [-0.8755, -2.8644], [-0.7903, -2.9246], [-0.6045, -2.7427], [-0.656, -2.6598]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.6425, -2.7033], [-0.8308, -2.8826], [-0.7736, -2.9698], [-0.6864, -3.027], [-0.5071, -2.8388], [-0.5615, -2.7577]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.5464, -2.8007], [-0.7284, -2.9865], [-0.6682, -3.0717], [-0.579, -3.1258], [-0.4064, -2.9314], [-0.4636, -2.8523]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.447, -2.8947], [-0.6223, -3.0867], [-0.5592, -3.1698], [-0.4682, -3.2207], [-0.3025, -3.0204], [-0.3624, -2.9434]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.3444, -2.9852], [-0.5129, -3.1832], [-0.4469, -3.264], [-0.3542, -3.3118], [-0.1955, -3.1058], [-0.2581, -3.0309]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.2387, -3.0721], [-0.4002, -3.2758], [-0.3314, -3.3543], [-0.237, -3.3988], [-0.0857, -3.1874], [-0.1508, -3.1147]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.13, -3.1552], [-0.2843, -3.3645], [-0.2128, -3.4404], [-0.1169, -3.4816], [0.0269, -3.2651], [-0.0407, -3.1947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[-0.0184, -3.2344], [-0.1653, -3.449], [-0.0912, -3.5224], [0.006, -3.5602], [0.1422, -3.3388], [0.0721, -3.2708]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.0958, -3.3098], [-0.0435, -3.5293], [0.0331, -3.6001], [0.1316, -3.6345], [0.26, -3.4084], [0.1876, -3.343]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.2126, -3.3811], [0.081, -3.6053], [0.16, -3.6734], [0.2597, -3.7043], [0.3801, -3.4739], [0.3055, -3.411]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.3318, -3.4482], [0.2081, -3.6769], [0.2895, -3.7422], [0.3901, -3.7697], [0.5025, -3.5352], [0.4257, -3.4749]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.4533, -3.5112], [0.3377, -3.7441], [0.4212, -3.8065], [0.5228, -3.8304], [0.6269, -3.5921], [0.548, -3.5346]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.5769, -3.5699], [0.4695, -3.8067], [0.5552, -3.8661], [0.6575, -3.8865], [0.7532, -3.6447], [0.6724, -3.59]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.7024, -3.6242], [0.6034, -3.8646], [0.6911, -3.921], [0.794, -3.9378], [0.8813, -3.6929], [0.7986, -3.641]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.8298, -3.6741], [0.7392, -3.9178], [0.8288, -3.9712], [0.9323, -3.9843], [1.0109, -3.7365], [0.9265, -3.6875]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[0.9589, -3.7196], [0.8768, -3.9663], [0.9683, -4.0165], [1.0722, -4.026], [1.1421, -3.7756], [1.056, -3.7296]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.0895, -3.7605], [1.016, -4.0099], [1.1092, -4.0569], [1.2133, -4.0628], [1.2745, -3.8101], [1.1868, -3.7671]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.2214, -3.7968], [1.1567, -4.0487], [1.2514, -4.0924], [1.3557, -4.0946], [1.408, -3.8399], [1.3189, -3.8]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.3545, -3.8286], [1.2986, -4.0825], [1.3948, -4.1228], [1.4991, -4.1215], [1.5425, -3.8651], [1.4521, -3.8283]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.4886, -3.8556], [1.4417, -4.1113], [1.5392, -4.1483], [1.6434, -4.1433], [1.6778, -3.8856], [1.5861, -3.852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.6236, -3.8779], [1.5856, -4.1352], [1.6844, -4.1687], [1.7883, -4.1601], [1.8137, -3.9013], [1.7209, -3.8709]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.7593, -3.8956], [1.7303, -4.1539], [1.8302, -4.184], [1.9338, -4.1718], [1.9501, -3.9123], [1.8563, -3.8852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[1.8955, -3.9084], [1.8755, -4.1677], [1.9764, -4.1942], [2.0795, -4.1784], [2.0868, -3.9185], [1.9921, -3.8947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.0321, -3.9166], [2.0212, -4.1763], [2.1229, -4.1994], [2.2254, -4.1799], [2.2236, -3.9199], [2.1282, -3.8994]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.1689, -3.9199], [2.1671, -4.1799], [2.2695, -4.1994], [2.3713, -4.1763], [2.3604, -3.9166], [2.2643, -3.8994]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.3057, -3.9185], [2.3129, -4.1784], [2.416, -4.1942], [2.5169, -4.1677], [2.497, -3.9084], [2.4003, -3.8947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.4424, -3.9123], [2.4587, -4.1718], [2.5623, -4.184], [2.6622, -4.1539], [2.6332, -3.8956], [2.5361, -3.8852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.5788, -3.9013], [2.6041, -4.1601], [2.7081, -4.1687], [2.8069, -4.1352], [2.7689, -3.8779], [2.6715, -3.8709]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.7147, -3.8856], [2.7491, -4.1433], [2.8533, -4.1483], [2.9508, -4.1113], [2.9039, -3.8556], [2.8063, -3.852]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.85, -3.8651], [2.8933, -4.1215], [2.9976, -4.1228], [3.0938, -4.0825], [3.038, -3.8286], [2.9404, -3.8283]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[2.9845, -3.8399], [3.0367, -4.0946], [3.141, -4.0924], [3.2358, -4.0487], [3.1711, -3.7968], [3.0735, -3.8]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.118, -3.8101], [3.1791, -4.0628], [3.2833, -4.0569], [3.3764, -4.0099], [3.303, -3.7605], [3.2056, -3.7671]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.2504, -3.7756], [3.3203, -4.026], [3.4242, -4.0165], [3.5156, -3.9663], [3.4336, -3.7196], [3.3365, -3.7296]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.3815, -3.7365], [3.4601, -3.9843], [3.5636, -3.9712], [3.6533, -3.9178], [3.5626, -3.6741], [3.466, -3.6875]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.5112, -3.6929], [3.5984, -3.9378], [3.7014, -3.921], [3.7891, -3.8646], [3.69, -3.6242], [3.5939, -3.641]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.6393, -3.6447], [3.735, -3.8865], [3.8373, -3.8661], [3.923, -3.8067], [3.8156, -3.5699], [3.7201, -3.59]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.7656, -3.5921], [3.8697, -3.8304], [3.9712, -3.8065], [4.0548, -3.7441], [3.9392, -3.5112], [3.8444, -3.5346]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[3.89, -3.5352], [4.0024, -3.7697], [4.103, -3.7422], [4.1843, -3.6769], [4.0607, -3.4482], [3.9668, -3.4749]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.0124, -3.4739], [4.1328, -3.7043], [4.2324, -3.6734], [4.3115, -3.6053], [4.1799, -3.3811], [4.087, -3.411]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.1325, -3.4084], [4.2609, -3.6345], [4.3594, -3.6001], [4.436, -3.5293], [4.2967, -3.3098], [4.2049, -3.343]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.2503, -3.3388], [4.3865, -3.5602], [4.4837, -3.5224], [4.5578, -3.449], [4.4109, -3.2344], [4.3203, -3.2708]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.3655, -3.2651], [4.5094, -3.4816], [4.6053, -3.4404], [4.6767, -3.3645], [4.5224, -3.1552], [4.4332, -3.1947]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.4782, -3.1874], [4.6295, -3.3988], [4.7239, -3.3543], [4.7926, -3.2758], [4.6311, -3.0721], [4.5433, -3.1147]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.588, -3.1058], [4.7466, -3.3118], [4.8394, -3.264], [4.9054, -3.1832], [4.7369, -2.9852], [4.6506, -3.0309]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.6949, -3.0204], [4.8607, -3.2207], [4.9517, -3.1698], [5.0148, -3.0867], [4.8395, -2.8947], [4.7549, -2.9434]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.7988, -2.9314], [4.9714, -3.1258], [5.0606, -3.0717], [5.1208, -2.9865], [4.9389, -2.8007], [4.856, -2.8523]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.8995, -2.8388], [5.0788, -3.027], [5.1661, -2.9698], [5.2233, -2.8826], [5.035, -2.7033], [4.954, -2.7577]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[4.997, -2.7427], [5.1827, -2.9246], [5.2679, -2.8644], [5.322, -2.7752], [5.1276, -2.6026], [5.0485, -2.6598]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.091, -2.6433], [5.283, -2.8186], [5.366, -2.7554], [5.417, -2.6644], [5.2166, -2.4987], [5.1396, -2.5586]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.1815, -2.5406], [5.3795, -2.7091], [5.4602, -2.6431], [5.508, -2.5504], [5.302, -2.3918], [5.2271, -2.4543]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.2683, -2.4349], [5.4721, -2.5964], [5.5505, -2.5276], [5.595, -2.4333], [5.3836, -2.2819], [5.3109, -2.3471]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.3514, -2.3262], [5.5607, -2.4805], [5.6367, -2.409], [5.6778, -2.3132], [5.4613, -2.1693], [5.3909, -2.2369]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.4307, -2.2147], [5.6452, -2.3616], [5.7187, -2.2875], [5.7565, -2.1903], [5.535, -2.054], [5.4671, -2.1241]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.506, -2.1004], [5.7255, -2.2398], [5.7963, -2.1632], [5.8307, -2.0647], [5.6047, -1.9363], [5.5392, -2.0086]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.5773, -1.9837], [5.8015, -2.1152], [5.8696, -2.0362], [5.9006, -1.9366], [5.6702, -1.8161], [5.6073, -1.8908]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.6445, -1.8644], [5.8732, -1.9881], [5.9385, -1.9068], [5.9659, -1.8061], [5.7314, -1.6938], [5.6712, -1.7706]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.7074, -1.743], [5.9403, -1.8586], [6.0027, -1.775], [6.0266, -1.6735], [5.7884, -1.5694], [5.7308, -1.6482]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.7661, -1.6194], [6.0029, -1.7268], [6.0624, -1.6411], [6.0827, -1.5388], [5.841, -1.443], [5.7862, -1.5239]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.8205, -1.4938], [6.0608, -1.5929], [6.1173, -1.5051], [6.134, -1.4022], [5.8891, -1.315], [5.8372, -1.3976]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.8704, -1.3664], [6.1141, -1.457], [6.1674, -1.3674], [6.1806, -1.2639], [5.9327, -1.1853], [5.8838, -1.2697]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.9158, -1.2373], [6.1625, -1.3194], [6.2127, -1.228], [6.2223, -1.1241], [5.9718, -1.0542], [5.9258, -1.1402]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.9567, -1.1068], [6.2062, -1.1802], [6.2531, -1.087], [6.259, -0.9829], [6.0063, -0.9218], [5.9633, -1.0094]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[5.9931, -0.9749], [6.2449, -1.0395], [6.2886, -0.9448], [6.2909, -0.8405], [6.0362, -0.7882], [5.9963, -0.8773]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0248, -0.8418], [6.2787, -0.8976], [6.3191, -0.8014], [6.3177, -0.6971], [6.0613, -0.6537], [6.0246, -0.7442]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0518, -0.7076], [6.3076, -0.7546], [6.3445, -0.657], [6.3395, -0.5528], [6.0818, -0.5184], [6.0482, -0.6101]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0742, -0.5726], [6.3314, -0.6106], [6.3649, -0.5119], [6.3563, -0.4079], [6.0975, -0.3825], [6.0672, -0.4753]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.0918, -0.437], [6.3502, -0.4659], [6.3803, -0.3661], [6.368, -0.2625], [6.1085, -0.2461], [6.0814, -0.3399]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.1047, -0.3007], [6.3639, -0.3207], [6.3905, -0.2198], [6.3746, -0.1167], [6.1147, -0.1095], [6.0909, -0.2041]], y: [-1.6, 1.2], collide: 1}
      - {kind: poly, points: [[6.1128, -0.1642], [6.3726, -0.175], [6.3956, -0.0733], [6.3761, 0.0292], [6.1161, 0.0274], [6.0956, -0.0681]], y: [-1.6, 1.2], collide: 1}
      - {kind: rod, from: [1.0962, 0.1, 1.9053], to: [0.2462, 0.1, 3.3775], radius: 0.3, capsule: true, collide: 1, color: "#6b5a44"}   # the tappet B (its depth: from the spokes to the rim's edge)
      - {kind: rod, from: [1.7462, -0.6, 0.7794], to: [1.0962, -0.6, 1.9053], radius: 0.3, color: "#6b5a44"}   # its arm from the hub
      - {kind: rod, from: [2.1962, -1.0, 0], to: [2.1962, 3.2, 0], radius: 0.35, color: "#8f8a80"}   # C's shaft
  - id: frame
    shape: frame
    color: "#8f8a80"
    rods:
      - {from: [-5.5, 3.2, 0], to: [-5.5, 4.4, 0], radius: 0.6}
      - {from: [2.1962, 3.2, 0], to: [2.1962, 4.4, 0], radius: 0.6}
joints:
  - {id: j_c, type: hinge, body: wheel_c, axis: [0, -1, 0], damping: 0.05}   # positive: against the clock, as drawn
  - {id: j_a, type: hinge, body: wheel_a, axis: [0, 1, 0], damping: 0.005}
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_c, kind: velocity, rpm: 12, kv: 2, max_torque: 20}
checks:
  - {type: ratio, out: j_a, in: j_c, expect: 0.08333, tol: 0.001, settle_s: 3.76, window_s: 15.38}   # one stud a turn (three whole turns of C, mid-dwell to mid-dwell)
  - {type: still, joint: j_a, max: 0.005, settle_s: 4.0, window_s: 1.5}   # held by the rim between strokes
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [-1.5, 0, 0], position: [-1.5, -60, 8], fov: 34}
display:
  output: j_a
  labels: {j_c: "C with its rim and tappet B (driver)", j_a: "A, the stud wheel"}
  proof: {label: "Tappet out of contact", sub: "A is never turned"}

