# No. 199 (Brown 1868): "Another form of mangle-rack. The lantern-pinion revolves continuously in one direction, and gives reciprocating motion to the square
#  frame, which is guided by rollers or grooves. The pinion has only teeth in less than half of its circumference, so that while it engages one side of the
#  rack, the toothless half is directed against the other. The large tooth at the commencement of each rack is made to insure the teeth of the pinion being
#  properly in gear."
#
# Model (cm): the square frame slides along x between rollers. Inside its opening an upper rack hangs teeth down and a lower rack stands teeth up. A lantern
# pinion on a fixed shaft between them has 6 round pins (r 0.4) at 18 deg pitch on a circle of radius 6, over 90 deg of
# its circumference. Only the pinion is driven (5 rpm, one way). While its pins pass the top they drive the frame one way at 6 cm a radian through the
# upper rack; then the toothless side faces the upper rack and the pins pass the bottom, driving it back through the lower rack. Each stroke lasts
# 163.7 deg of the pinion (90 deg of pins plus the 73.7 deg over which a pin is in the racks' depth), with a short dwell between,
# when no pin is in either rack and the frame is held by the friction of its rollers. The rack spaces are generated as the sweep of the pins over
# this motion (0.05 clearance, the teeth stacked in 7 slabs). The material left beyond the first space of each rack is the large first tooth.
# Generator: opencode-runs/batch11/gen199.py.
number: 199
slug: mangle-rack-lantern
name: Another form of mangle-rack
brown: "Another form of mangle-rack. The lantern-pinion revolves continuously in one direction, and gives reciprocating motion to the square frame, which is guided by rollers or grooves. The pinion has only teeth in less than half of its circumference, so that while it engages one side of the rack, the toothless half is directed against the other. The large tooth at the commencement of each rack is made to insure the teeth of the pinion being properly in gear."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: CG
  multiccd: true
  duration_s: 25.0
  floor: false
bodies:
  - id: frame
    shape: part
    pos: [0, 0, 0]
    density: 2700
    friction: 0.1
    color: "#e8dec6"
    pieces:
      - {kind: poly, points: [[-20.0474, 7.9], [2.8996, 7.9], [2.8996, 10.9], [-20.0474, 10.9]], y: [-1.0, -0.05], collide: 0}
      - {kind: poly, points: [[-20.0474, -10.9], [2.8996, -10.9], [2.8996, -7.9], [-20.0474, -7.9]], y: [-1.0, -0.05], collide: 0}
      - {kind: poly, points: [[-17.6474, -7.9], [-16.0474, -7.9], [-16.0474, 7.9], [-17.6474, 7.9]], y: [-1.0, -0.05], collide: 0}
      - {kind: poly, points: [[-1.1004, -7.9], [0.4996, -7.9], [0.4996, 7.9], [-1.1004, 7.9]], y: [-1.0, -0.05], collide: 0}
      - {kind: poly, points: [[-16.0474, 5.2], [-13.9074, 5.2], [-13.9074, 5.3857], [-16.0474, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.6724, 5.2], [-12.0224, 5.2], [-12.0224, 5.3857], [-12.6724, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.7874, 5.2], [-10.1374, 5.2], [-10.1374, 5.3857], [-10.7874, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9024, 5.2], [-8.2524, 5.2], [-8.2524, 5.3857], [-8.9024, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.0174, 5.2], [-6.3674, 5.2], [-6.3674, 5.3857], [-7.0174, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.1324, 5.2], [-4.4824, 5.2], [-4.4824, 5.3857], [-5.1324, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.2474, 5.2], [-1.1024, 5.2], [-1.1024, 5.3857], [-3.2474, 5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 5.3857], [-13.8574, 5.3857], [-13.8574, 5.5714], [-16.0474, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.7224, 5.3857], [-11.9724, 5.3857], [-11.9724, 5.5714], [-12.7224, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.8374, 5.3857], [-10.0874, 5.3857], [-10.0874, 5.5714], [-10.8374, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9524, 5.3857], [-8.2024, 5.3857], [-8.2024, 5.5714], [-8.9524, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.0674, 5.3857], [-6.3174, 5.3857], [-6.3174, 5.5714], [-7.0674, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.1824, 5.3857], [-4.4324, 5.3857], [-4.4324, 5.5714], [-5.1824, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.2974, 5.3857], [-1.1024, 5.3857], [-1.1024, 5.5714], [-3.2974, 5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 5.5714], [-13.8124, 5.5714], [-13.8124, 5.7571], [-16.0474, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.7674, 5.5714], [-11.9274, 5.5714], [-11.9274, 5.7571], [-12.7674, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.8824, 5.5714], [-10.0424, 5.5714], [-10.0424, 5.7571], [-10.8824, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9974, 5.5714], [-8.1574, 5.5714], [-8.1574, 5.7571], [-8.9974, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1124, 5.5714], [-6.2724, 5.5714], [-6.2724, 5.7571], [-7.1124, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2274, 5.5714], [-4.3874, 5.5714], [-4.3874, 5.7571], [-5.2274, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.3424, 5.5714], [-1.1024, 5.5714], [-1.1024, 5.7571], [-3.3424, 5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 5.7571], [-13.7774, 5.7571], [-13.7774, 5.9429], [-16.0474, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8024, 5.7571], [-11.8924, 5.7571], [-11.8924, 5.9429], [-12.8024, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9174, 5.7571], [-10.0074, 5.7571], [-10.0074, 5.9429], [-10.9174, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0324, 5.7571], [-8.1224, 5.7571], [-8.1224, 5.9429], [-9.0324, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1474, 5.7571], [-6.2374, 5.7571], [-6.2374, 5.9429], [-7.1474, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2624, 5.7571], [-4.3524, 5.7571], [-4.3524, 5.9429], [-5.2624, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.3774, 5.7571], [-1.1024, 5.7571], [-1.1024, 5.9429], [-3.3774, 5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 5.9429], [-13.7524, 5.9429], [-13.7524, 6.1286], [-16.0474, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8224, 5.9429], [-11.8674, 5.9429], [-11.8674, 6.1286], [-12.8224, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9374, 5.9429], [-9.9824, 5.9429], [-9.9824, 6.1286], [-10.9374, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0524, 5.9429], [-8.0974, 5.9429], [-8.0974, 6.1286], [-9.0524, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1674, 5.9429], [-6.2124, 5.9429], [-6.2124, 6.1286], [-7.1674, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2874, 5.9429], [-4.3274, 5.9429], [-4.3274, 6.1286], [-5.2874, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.4024, 5.9429], [-1.1024, 5.9429], [-1.1024, 6.1286], [-3.4024, 6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 6.1286], [-13.7324, 6.1286], [-13.7324, 6.3143], [-16.0474, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8474, 6.1286], [-11.8474, 6.1286], [-11.8474, 6.3143], [-12.8474, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9624, 6.1286], [-9.9624, 6.1286], [-9.9624, 6.3143], [-10.9624, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0774, 6.1286], [-8.0774, 6.1286], [-8.0774, 6.3143], [-9.0774, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1924, 6.1286], [-6.1924, 6.1286], [-6.1924, 6.3143], [-7.1924, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.3074, 6.1286], [-4.3074, 6.1286], [-4.3074, 6.3143], [-5.3074, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.4224, 6.1286], [-1.1024, 6.1286], [-1.1024, 6.3143], [-3.4224, 6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 6.3143], [-13.6224, 6.3143], [-13.6224, 6.5], [-16.0474, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.9574, 6.3143], [-11.7374, 6.3143], [-11.7374, 6.5], [-12.9574, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-11.0724, 6.3143], [-9.8524, 6.3143], [-9.8524, 6.5], [-11.0724, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.1874, 6.3143], [-7.9674, 6.3143], [-7.9674, 6.5], [-9.1874, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.3024, 6.3143], [-6.0824, 6.3143], [-6.0824, 6.5], [-7.3024, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.4174, 6.3143], [-4.1974, 6.3143], [-4.1974, 6.5], [-5.4174, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.5324, 6.3143], [-1.1024, 6.3143], [-1.1024, 6.5], [-3.5324, 6.5]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, 6.5], [-1.1004, 6.5], [-1.1004, 7.9], [-16.0474, 7.9]], y: [-1.0, -0.05], collide: 1}   # the upper rack's back
      - {kind: poly, points: [[-16.0474, -5.3857], [-13.9074, -5.3857], [-13.9074, -5.2], [-16.0474, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.6724, -5.3857], [-12.0224, -5.3857], [-12.0224, -5.2], [-12.6724, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.7874, -5.3857], [-10.1374, -5.3857], [-10.1374, -5.2], [-10.7874, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9024, -5.3857], [-8.2524, -5.3857], [-8.2524, -5.2], [-8.9024, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.0174, -5.3857], [-6.3674, -5.3857], [-6.3674, -5.2], [-7.0174, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.1324, -5.3857], [-4.4824, -5.3857], [-4.4824, -5.2], [-5.1324, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.2474, -5.3857], [-1.1024, -5.3857], [-1.1024, -5.2], [-3.2474, -5.2]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -5.5714], [-13.8574, -5.5714], [-13.8574, -5.3857], [-16.0474, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.7224, -5.5714], [-11.9724, -5.5714], [-11.9724, -5.3857], [-12.7224, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.8374, -5.5714], [-10.0874, -5.5714], [-10.0874, -5.3857], [-10.8374, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9524, -5.5714], [-8.2024, -5.5714], [-8.2024, -5.3857], [-8.9524, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.0674, -5.5714], [-6.3174, -5.5714], [-6.3174, -5.3857], [-7.0674, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.1824, -5.5714], [-4.4324, -5.5714], [-4.4324, -5.3857], [-5.1824, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.2974, -5.5714], [-1.1024, -5.5714], [-1.1024, -5.3857], [-3.2974, -5.3857]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -5.7571], [-13.8124, -5.7571], [-13.8124, -5.5714], [-16.0474, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.7674, -5.7571], [-11.9274, -5.7571], [-11.9274, -5.5714], [-12.7674, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.8824, -5.7571], [-10.0424, -5.7571], [-10.0424, -5.5714], [-10.8824, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-8.9974, -5.7571], [-8.1574, -5.7571], [-8.1574, -5.5714], [-8.9974, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1124, -5.7571], [-6.2724, -5.7571], [-6.2724, -5.5714], [-7.1124, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2274, -5.7571], [-4.3874, -5.7571], [-4.3874, -5.5714], [-5.2274, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.3424, -5.7571], [-1.1024, -5.7571], [-1.1024, -5.5714], [-3.3424, -5.5714]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -5.9429], [-13.7774, -5.9429], [-13.7774, -5.7571], [-16.0474, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8024, -5.9429], [-11.8924, -5.9429], [-11.8924, -5.7571], [-12.8024, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9174, -5.9429], [-10.0074, -5.9429], [-10.0074, -5.7571], [-10.9174, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0324, -5.9429], [-8.1224, -5.9429], [-8.1224, -5.7571], [-9.0324, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1474, -5.9429], [-6.2374, -5.9429], [-6.2374, -5.7571], [-7.1474, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2624, -5.9429], [-4.3524, -5.9429], [-4.3524, -5.7571], [-5.2624, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.3774, -5.9429], [-1.1024, -5.9429], [-1.1024, -5.7571], [-3.3774, -5.7571]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -6.1286], [-13.7524, -6.1286], [-13.7524, -5.9429], [-16.0474, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8224, -6.1286], [-11.8674, -6.1286], [-11.8674, -5.9429], [-12.8224, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9374, -6.1286], [-9.9824, -6.1286], [-9.9824, -5.9429], [-10.9374, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0524, -6.1286], [-8.0974, -6.1286], [-8.0974, -5.9429], [-9.0524, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1674, -6.1286], [-6.2124, -6.1286], [-6.2124, -5.9429], [-7.1674, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.2874, -6.1286], [-4.3274, -6.1286], [-4.3274, -5.9429], [-5.2874, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.4024, -6.1286], [-1.1024, -6.1286], [-1.1024, -5.9429], [-3.4024, -5.9429]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -6.3143], [-13.7324, -6.3143], [-13.7324, -6.1286], [-16.0474, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.8474, -6.3143], [-11.8474, -6.3143], [-11.8474, -6.1286], [-12.8474, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-10.9624, -6.3143], [-9.9624, -6.3143], [-9.9624, -6.1286], [-10.9624, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.0774, -6.3143], [-8.0774, -6.3143], [-8.0774, -6.1286], [-9.0774, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.1924, -6.3143], [-6.1924, -6.3143], [-6.1924, -6.1286], [-7.1924, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.3074, -6.3143], [-4.3074, -6.3143], [-4.3074, -6.1286], [-5.3074, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.4224, -6.3143], [-1.1024, -6.3143], [-1.1024, -6.1286], [-3.4224, -6.1286]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -6.5], [-13.6224, -6.5], [-13.6224, -6.3143], [-16.0474, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-12.9574, -6.5], [-11.7374, -6.5], [-11.7374, -6.3143], [-12.9574, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-11.0724, -6.5], [-9.8524, -6.5], [-9.8524, -6.3143], [-11.0724, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-9.1874, -6.5], [-7.9674, -6.5], [-7.9674, -6.3143], [-9.1874, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-7.3024, -6.5], [-6.0824, -6.5], [-6.0824, -6.3143], [-7.3024, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-5.4174, -6.5], [-4.1974, -6.5], [-4.1974, -6.3143], [-5.4174, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-3.5324, -6.5], [-1.1024, -6.5], [-1.1024, -6.3143], [-3.5324, -6.3143]], y: [-1.0, -0.05], collide: 1}
      - {kind: poly, points: [[-16.0474, -7.9], [-1.1004, -7.9], [-1.1004, -6.5], [-16.0474, -6.5]], y: [-1.0, -0.05], collide: 1}   # the lower rack's back
  - id: pinion
    shape: part
    pos: [0, 0, 0]
    density: 7800
    friction: 0.1
    color: "#e4d9bf"
    pieces:
      - {kind: disc, center: [-4.2426, 4.2426], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: disc, center: [-5.346, 2.7239], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: disc, center: [-5.9261, 0.9386], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: disc, center: [-5.9261, -0.9386], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: disc, center: [-5.346, -2.7239], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: disc, center: [-4.2426, -4.2426], radius: 0.4, y: [-1.0, -0.05], collide: 2}
      - {kind: band, center: [0, 0], r: [1.0, 5.25], a: [-1.2708, 1.2708], slices: 16, y: [0.1, 0.6], collide: 0}   # the plain half, toothless
      - {kind: disc, center: [0, 0], radius: 1.1, y: [-1.0, 0.6], collide: 0}   # the boss
      - {kind: rod, from: [0, 0.6, 0], to: [0, 3.4, 0], radius: 0.4, collide: 0}   # the fixed shaft, to its standard behind
  - id: standard
    shape: frame
    color: "#8f8a80"
    rods:
      - {from: [0, 3.6, 0], to: [0, 3.6, -16.9], radius: 0.6}
      - {from: [-6.0, -0.8, 12.6], to: [-6.0, 0.4, 12.6], radius: 1.6}   # a roller
      - {from: [-6.0, -0.8, -12.6], to: [-6.0, 0.4, -12.6], radius: 1.6}   # a roller
      - {from: [6.0, -0.8, 12.6], to: [6.0, 0.4, 12.6], radius: 1.6}   # a roller
      - {from: [6.0, -0.8, -12.6], to: [6.0, 0.4, -12.6], radius: 1.6}   # a roller
joints:
  - {id: j_frame, type: slide, body: frame, axis: [1, 0, 0], damping: 0.5, frictionloss: 1.5, range: [-19.1468, 19.1468]}   # roller friction holds it in the dwell
  - {id: j_pinion, type: hinge, body: pinion, axis: [0, -1, 0], damping: 0.001}   # the one driven joint; +: counter-clockwise
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_pinion, kind: velocity, rpm: 5.0, kv: 6, max_torque: 6}   # kv x speed (3.1) under the cap, stiff enough that the roller friction does not slow the pinion
checks:
  - {type: ratio, out: j_frame, in: j_pinion, expect: 0.06, tol: 0.0018, settle_s: 1.1, window_s: 3.9}   # pins under the lower rack: the frame goes right at R a radian
  - {type: ratio, out: j_frame, in: j_pinion, expect: -0.06, tol: 0.0018, settle_s: 7.1, window_s: 3.9}   # pins over the upper rack: back at the same speed
  - {type: amplitude, joint: j_frame, min: 0.0754, max: 0.0874, settle_s: 0.1, window_s: 24.5}   # stroke R x 163.7 deg, less a late pick-up at each stroke end (0.0783 found), the same on both turns
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [0, 0, 0], position: [0, -105, 1], fov: 34}
display:
  output: j_frame
  labels: {j_pinion: "Lantern pinion (driver, one way)", j_frame: "Square frame (to and fro)"}
  proof: {label: "Pins out of contact", sub: "the pinion turns alone: the frame stands still"}

