# No. 229 (Brown 1868): "Another variety." (of chain and pulley, after Nos. 227 and 228)
#
# Model (cm; the wheel's face in the x-z plane, gravity on): the plate's chain of flat links (pitch 2.4), inner and outer plates alternately, hinged on their
# pins; each link has a tooth beneath it. The wheel is notched round its rim (16 notches; the chain lies on it as an 16-gon, pins at r 6.151): the links rest
# on the rim between the notches and each tooth enters a notch and is pushed by its side. The chain hangs over the wheel; its right-hand end carries a
# 0.4 kg weight running in vertical guides, its left end hangs free. The wheel is turned counter-clockwise (4 rpm, the only driven joint) and
# winds the weight up at 6.112 cm a radian on the mean.
# Generator: opencode-runs/batch11/gen229.py.
number: 229
slug: another-variety-chain-pulley
name: Another variety of chain and pulley
brown: "Another variety."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  multiccd: true
  duration_s: 8
  floor: false
bodies:
  - id: pulley
    shape: part
    pos: [0, 0, 0]
    mass: 1.0
    friction: 0.2
    color: "#d9cfb6"
    pieces:
      - {kind: poly, points: [[4.4396, -0.6588], [5.6514, -0.4614], [5.7432, 0.0], [5.6514, 0.4614], [4.4396, 0.6588], [2.1762, 0.3229], [2.1762, -0.3229]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[4.4396, 0.6588], [4.3538, 1.0903], [2.1341, 0.5344], [2.1762, 0.3229]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[4.3538, 1.0903], [5.3978, 1.7364], [5.306, 2.1978], [5.0446, 2.589], [3.8495, 2.3076], [1.8869, 1.1311], [2.1341, 0.5344]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[3.8495, 2.3076], [3.6051, 2.6734], [1.7671, 1.3104], [1.8869, 1.1311]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[3.6051, 2.6734], [4.3224, 3.6699], [4.061, 4.061], [3.6699, 4.3224], [2.6734, 3.6051], [1.3104, 1.7671], [1.7671, 1.3104]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[2.6734, 3.6051], [2.3076, 3.8495], [1.1311, 1.8869], [1.3104, 1.7671]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[2.3076, 3.8495], [2.589, 5.0446], [2.1978, 5.306], [1.7364, 5.3978], [1.0903, 4.3538], [0.5344, 2.1341], [1.1311, 1.8869]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[1.0903, 4.3538], [0.6588, 4.4396], [0.3229, 2.1762], [0.5344, 2.1341]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[0.6588, 4.4396], [0.4614, 5.6514], [0.0, 5.7432], [-0.4614, 5.6514], [-0.6588, 4.4396], [-0.3229, 2.1762], [0.3229, 2.1762]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-0.6588, 4.4396], [-1.0903, 4.3538], [-0.5344, 2.1341], [-0.3229, 2.1762]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-1.0903, 4.3538], [-1.7364, 5.3978], [-2.1978, 5.306], [-2.589, 5.0446], [-2.3076, 3.8495], [-1.1311, 1.8869], [-0.5344, 2.1341]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-2.3076, 3.8495], [-2.6734, 3.6051], [-1.3104, 1.7671], [-1.1311, 1.8869]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-2.6734, 3.6051], [-3.6699, 4.3224], [-4.061, 4.061], [-4.3224, 3.6699], [-3.6051, 2.6734], [-1.7671, 1.3104], [-1.3104, 1.7671]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-3.6051, 2.6734], [-3.8495, 2.3076], [-1.8869, 1.1311], [-1.7671, 1.3104]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-3.8495, 2.3076], [-5.0446, 2.589], [-5.306, 2.1978], [-5.3978, 1.7364], [-4.3538, 1.0903], [-2.1341, 0.5344], [-1.8869, 1.1311]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-4.3538, 1.0903], [-4.4396, 0.6588], [-2.1762, 0.3229], [-2.1341, 0.5344]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-4.4396, 0.6588], [-5.6514, 0.4614], [-5.7432, 0.0], [-5.6514, -0.4614], [-4.4396, -0.6588], [-2.1762, -0.3229], [-2.1762, 0.3229]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-4.4396, -0.6588], [-4.3538, -1.0903], [-2.1341, -0.5344], [-2.1762, -0.3229]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-4.3538, -1.0903], [-5.3978, -1.7364], [-5.306, -2.1978], [-5.0446, -2.589], [-3.8495, -2.3076], [-1.8869, -1.1311], [-2.1341, -0.5344]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-3.8495, -2.3076], [-3.6051, -2.6734], [-1.7671, -1.3104], [-1.8869, -1.1311]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-3.6051, -2.6734], [-4.3224, -3.6699], [-4.061, -4.061], [-3.6699, -4.3224], [-2.6734, -3.6051], [-1.3104, -1.7671], [-1.7671, -1.3104]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-2.6734, -3.6051], [-2.3076, -3.8495], [-1.1311, -1.8869], [-1.3104, -1.7671]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-2.3076, -3.8495], [-2.589, -5.0446], [-2.1978, -5.306], [-1.7364, -5.3978], [-1.0903, -4.3538], [-0.5344, -2.1341], [-1.1311, -1.8869]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-1.0903, -4.3538], [-0.6588, -4.4396], [-0.3229, -2.1762], [-0.5344, -2.1341]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[-0.6588, -4.4396], [-0.4614, -5.6514], [-0.0, -5.7432], [0.4614, -5.6514], [0.6588, -4.4396], [0.3229, -2.1762], [-0.3229, -2.1762]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[0.6588, -4.4396], [1.0903, -4.3538], [0.5344, -2.1341], [0.3229, -2.1762]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[1.0903, -4.3538], [1.7364, -5.3978], [2.1978, -5.306], [2.589, -5.0446], [2.3076, -3.8495], [1.1311, -1.8869], [0.5344, -2.1341]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[2.3076, -3.8495], [2.6734, -3.6051], [1.3104, -1.7671], [1.1311, -1.8869]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[2.6734, -3.6051], [3.6699, -4.3224], [4.061, -4.061], [4.3224, -3.6699], [3.6051, -2.6734], [1.7671, -1.3104], [1.3104, -1.7671]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[3.6051, -2.6734], [3.8495, -2.3076], [1.8869, -1.1311], [1.7671, -1.3104]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[3.8495, -2.3076], [5.0446, -2.589], [5.306, -2.1978], [5.3978, -1.7364], [4.3538, -1.0903], [2.1341, -0.5344], [1.8869, -1.1311]], y: [-0.9, 0.9], collide: 1}
      - {kind: poly, points: [[4.3538, -1.0903], [4.4396, -0.6588], [2.1762, -0.3229], [2.1341, -0.5344]], y: [-0.9, 0.9], collide: 1}
      - {kind: disc, center: [0, 0], radius: 4.4328, inner: 0.6, y: [-0.95, 0.95], collide: 0}   # the web, to the notches' bottoms (in front of the blocks' joints)
      - {kind: disc, center: [0, 0], radius: 1.3, inner: 0.6, y: [-1.3, -0.9], collide: 0, color: "#cfc6b4"}   # the boss
  - id: load
    shape: part
    pos: [6.151, 0, -24.0]
    mass: 0.4
    friction: 0.1
    color: "#6b5a44"
    pieces:
      - {kind: rod, from: [6.151, 0, -24.0], to: [6.151, 0, -25.2], radius: 0.25, collide: 0}   # the hook
      - {kind: poly, points: [[4.551, -25.2], [7.751, -25.2], [7.751, -28.2], [4.551, -28.2]], y: [-1.2, 1.2], collide: 0}   # the weight
  - id: L0
    shape: part
    pos: [6.151, 0, -24.0]
    mount: load
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.751, -24.45], [5.751, -21.15], [6.701, -21.15], [6.701, -24.45]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.751, -23.3], [5.751, -22.3], [4.851, -22.68], [4.851, -22.92]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -24.0], to: [6.151, 0.95, -24.0], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L1
    shape: part
    pos: [6.151, 0, -21.6]
    mount: L0
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.751, -22.05], [5.751, -18.75], [6.701, -18.75], [6.701, -22.05]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.751, -22.05], [5.751, -18.75], [6.701, -18.75], [6.701, -22.05]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[5.751, -20.9], [5.751, -19.9], [4.851, -20.28], [4.851, -20.52]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -21.6], to: [6.151, 0.95, -21.6], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L2
    shape: part
    pos: [6.151, 0, -19.2]
    mount: L1
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.751, -19.65], [5.751, -16.35], [6.701, -16.35], [6.701, -19.65]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.751, -18.5], [5.751, -17.5], [4.851, -17.88], [4.851, -18.12]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -19.2], to: [6.151, 0.95, -19.2], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L3
    shape: part
    pos: [6.151, 0, -16.8]
    mount: L2
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.751, -17.25], [5.751, -13.95], [6.701, -13.95], [6.701, -17.25]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.751, -17.25], [5.751, -13.95], [6.701, -13.95], [6.701, -17.25]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[5.751, -16.1], [5.751, -15.1], [4.851, -15.48], [4.851, -15.72]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -16.8], to: [6.151, 0.95, -16.8], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L4
    shape: part
    pos: [6.151, 0, -14.4]
    mount: L3
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.751, -14.85], [5.751, -11.55], [6.701, -11.55], [6.701, -14.85]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.751, -13.7], [5.751, -12.7], [4.851, -13.08], [4.851, -13.32]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -14.4], to: [6.151, 0.95, -14.4], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L5
    shape: part
    pos: [6.151, 0, -12.0]
    mount: L4
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.751, -12.45], [5.751, -9.15], [6.701, -9.15], [6.701, -12.45]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.751, -12.45], [5.751, -9.15], [6.701, -9.15], [6.701, -12.45]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[5.751, -11.3], [5.751, -10.3], [4.851, -10.68], [4.851, -10.92]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -12.0], to: [6.151, 0.95, -12.0], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L6
    shape: part
    pos: [6.151, 0, -9.6]
    mount: L5
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.751, -10.05], [5.751, -6.75], [6.701, -6.75], [6.701, -10.05]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.751, -8.9], [5.751, -7.9], [4.851, -8.28], [4.851, -8.52]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -9.6], to: [6.151, 0.95, -9.6], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L7
    shape: part
    pos: [6.151, 0, -7.2]
    mount: L6
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.751, -7.65], [5.751, -4.35], [6.701, -4.35], [6.701, -7.65]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.751, -7.65], [5.751, -4.35], [6.701, -4.35], [6.701, -7.65]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[5.751, -6.5], [5.751, -5.5], [4.851, -5.88], [4.851, -6.12]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -7.2], to: [6.151, 0.95, -7.2], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L8
    shape: part
    pos: [6.151, 0, -4.8]
    mount: L7
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.751, -5.25], [5.751, -1.95], [6.701, -1.95], [6.701, -5.25]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.751, -4.1], [5.751, -3.1], [4.851, -3.48], [4.851, -3.72]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -4.8], to: [6.151, 0.95, -4.8], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L9
    shape: part
    pos: [6.151, 0, -2.4]
    mount: L8
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.751, -2.85], [5.751, 0.45], [6.701, 0.45], [6.701, -2.85]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.751, -2.85], [5.751, 0.45], [6.701, 0.45], [6.701, -2.85]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[5.751, -1.7], [5.751, -0.7], [4.851, -1.08], [4.851, -1.32]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, -2.4], to: [6.151, 0.95, -2.4], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L10
    shape: part
    pos: [6.151, 0, 0.0]
    mount: L9
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[5.8465, -0.5194], [5.2027, 2.7172], [6.1344, 2.9025], [6.7782, -0.3341]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[5.6221, 0.6085], [5.427, 1.5893], [4.6185, 1.041], [4.6653, 0.8056]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [6.151, -0.95, 0.0], to: [6.151, 0.95, 0.0], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L11
    shape: part
    pos: [5.6828, 0, 2.3539]
    mount: L10
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[5.6002, 1.7575], [3.7668, 4.5013], [4.5567, 5.0291], [6.3901, 2.2853]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[5.6002, 1.7575], [3.7668, 4.5013], [4.5567, 5.0291], [6.3901, 2.2853]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[4.9613, 2.7137], [4.4057, 3.5452], [3.8685, 2.7292], [4.0019, 2.5296]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [5.6828, -0.95, 2.3539], to: [5.6828, 0.95, 2.3539], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L12
    shape: part
    pos: [4.3494, 0, 4.3494]
    mount: L11
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[4.5013, 3.7668], [1.7575, 5.6002], [2.2853, 6.3901], [5.0291, 4.5567]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[3.5452, 4.4057], [2.7137, 4.9613], [2.5296, 4.0019], [2.7292, 3.8685]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [4.3494, -0.95, 4.3494], to: [4.3494, 0.95, 4.3494], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L13
    shape: part
    pos: [2.3539, 0, 5.6828]
    mount: L12
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[2.7172, 5.2027], [-0.5194, 5.8465], [-0.3341, 6.7782], [2.9025, 6.1344]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[2.7172, 5.2027], [-0.5194, 5.8465], [-0.3341, 6.7782], [2.9025, 6.1344]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[1.5893, 5.427], [0.6085, 5.6221], [0.8056, 4.6653], [1.041, 4.6185]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [2.3539, -0.95, 5.6828], to: [2.3539, 0.95, 5.6828], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L14
    shape: part
    pos: [0.0, 0, 6.151]
    mount: L13
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[0.5194, 5.8465], [-2.7172, 5.2027], [-2.9025, 6.1344], [0.3341, 6.7782]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[-0.6085, 5.6221], [-1.5893, 5.427], [-1.041, 4.6185], [-0.8056, 4.6653]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [0.0, -0.95, 6.151], to: [0.0, 0.95, 6.151], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L15
    shape: part
    pos: [-2.3539, 0, 5.6828]
    mount: L14
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-1.7575, 5.6002], [-4.5013, 3.7668], [-5.0291, 4.5567], [-2.2853, 6.3901]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[-1.7575, 5.6002], [-4.5013, 3.7668], [-5.0291, 4.5567], [-2.2853, 6.3901]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[-2.7137, 4.9613], [-3.5452, 4.4057], [-2.7292, 3.8685], [-2.5296, 4.0019]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-2.3539, -0.95, 5.6828], to: [-2.3539, 0.95, 5.6828], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L16
    shape: part
    pos: [-4.3494, 0, 4.3494]
    mount: L15
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[-3.7668, 4.5013], [-5.6002, 1.7575], [-6.3901, 2.2853], [-4.5567, 5.0291]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[-4.4057, 3.5452], [-4.9613, 2.7137], [-4.0019, 2.5296], [-3.8685, 2.7292]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-4.3494, -0.95, 4.3494], to: [-4.3494, 0.95, 4.3494], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L17
    shape: part
    pos: [-5.6828, 0, 2.3539]
    mount: L16
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-5.2027, 2.7172], [-5.8465, -0.5194], [-6.7782, -0.3341], [-6.1344, 2.9025]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[-5.2027, 2.7172], [-5.8465, -0.5194], [-6.7782, -0.3341], [-6.1344, 2.9025]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[-5.427, 1.5893], [-5.6221, 0.6085], [-4.6653, 0.8056], [-4.6185, 1.041]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-5.6828, -0.95, 2.3539], to: [-5.6828, 0.95, 2.3539], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L18
    shape: part
    pos: [-6.151, 0, 0.0]
    mount: L17
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[-5.751, 0.45], [-5.751, -2.85], [-6.701, -2.85], [-6.701, 0.45]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[-5.751, -0.7], [-5.751, -1.7], [-4.851, -1.32], [-4.851, -1.08]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-6.151, -0.95, 0.0], to: [-6.151, 0.95, 0.0], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L19
    shape: part
    pos: [-6.151, 0, -2.4]
    mount: L18
    mass: 0.02
    friction: 0.2
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-5.751, -1.95], [-5.751, -5.25], [-6.701, -5.25], [-6.701, -1.95]], y: [0.45, 0.85], collide: 2}
      - {kind: poly, points: [[-5.751, -1.95], [-5.751, -5.25], [-6.701, -5.25], [-6.701, -1.95]], y: [-0.85, -0.45], collide: 2}
      - {kind: poly, points: [[-5.751, -3.1], [-5.751, -4.1], [-4.851, -3.72], [-4.851, -3.48]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-6.151, -0.95, -2.4], to: [-6.151, 0.95, -2.4], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: L20
    shape: part
    pos: [-6.151, 0, -4.8]
    mount: L19
    mass: 0.02
    friction: 0.2
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[-5.751, -4.35], [-5.751, -7.65], [-6.701, -7.65], [-6.701, -4.35]], y: [-0.4, 0.4], collide: 2}
      - {kind: poly, points: [[-5.751, -5.5], [-5.751, -6.5], [-4.851, -6.12], [-4.851, -5.88]], y: [-0.4, 0.4], collide: 2, color: "#7d776c"}
      - {kind: rod, from: [-6.151, -0.95, -4.8], to: [-6.151, 0.95, -4.8], radius: 0.22, collide: 0, color: "#5e584e"}
      - {kind: rod, from: [-6.151, -0.95, -7.2], to: [-6.151, 0.95, -7.2], radius: 0.22, collide: 0, color: "#5e584e"}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: rod, from: [0, -1.6, 0], to: [0, 3.4, 0], radius: 0.6, collide: 0, color: "#8f8a80"}   # the wheel's shaft
      - {kind: poly, points: [[-1.0, 0], [1.0, 0], [1.0, 9.151], [-1.0, 9.151]], y: [2.2, 3.4], collide: 0}   # its hanger
      - {kind: poly, points: [[-11, 9.151], [13, 9.151], [13, 10.351], [-11, 10.351]], y: [-1.5, 3.4], collide: 0, color: "#b9b09c"}   # the beam
      - {kind: rod, from: [4.151, 2.0, -26.5], to: [4.151, 2.0, -6], radius: 0.25, collide: 0, color: "#8f8a80"}   # the weight's guides
      - {kind: rod, from: [8.151, 2.0, -26.5], to: [8.151, 2.0, -6], radius: 0.25, collide: 0, color: "#8f8a80"}
joints:
  - {id: j_p, type: hinge, body: pulley, axis: [0, -1, 0], damping: 0.01}   # the one driven joint; +: counter-clockwise
  - {id: j_load, type: slide, body: load, axis: [0, 0, 1], damping: 0.5}   # +: up
  - {id: j_L0, type: hinge, body: L0, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L1, type: hinge, body: L1, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L2, type: hinge, body: L2, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L3, type: hinge, body: L3, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L4, type: hinge, body: L4, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L5, type: hinge, body: L5, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L6, type: hinge, body: L6, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L7, type: hinge, body: L7, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L8, type: hinge, body: L8, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L9, type: hinge, body: L9, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L10, type: hinge, body: L10, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L11, type: hinge, body: L11, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L12, type: hinge, body: L12, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L13, type: hinge, body: L13, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L14, type: hinge, body: L14, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L15, type: hinge, body: L15, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L16, type: hinge, body: L16, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L17, type: hinge, body: L17, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L18, type: hinge, body: L18, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L19, type: hinge, body: L19, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_L20, type: hinge, body: L20, axis: [0, -1, 0], damping: 0.0005}
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_p, kind: velocity, rpm: 4, kv: 20, max_torque: 20}
checks:
  - {type: follow, out: j_load, in: j_p, expect: 0.06112, tol: 0.00244, min_r2: 0.995, settle_s: 1.0, window_s: 6.5}   # the chain's pitch x 16 per turn
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [0.0, 0, -12.0], position: [4.0, -80.0, -2.0], fov: 34}
display:
  output: j_load
  labels: {j_p: "Notched wheel (driver)", j_load: "Weight"}
  proof: {label: "Wheel out of contact", sub: "the wheel turns, the chain falls off it and the weight drops"}

