# No. 420 (Brown 1868): "Arrangement of hammer for striking bells. Spring below the hammer raises it out of contact with the bell after striking, and so prevents it from interfering with the vibration of the metal in the bell."
#
# Model (cm, Brown's front view, gravity on). The bell-crank lever turns on a stud in its stand: its long arm, up towards the bell, carries the hammer
# head, and from the end of its other arm, level to the left, hangs the bell-pull cord. The one input is the hand on the cord: it draws it down
# (2.6 cm, to the end of its reach) and lets it go, once in 2 s (press-only: it can only pull). Drawn down, the cord swings the hammer back
# from the bell; let go, the hammer falls on the bell by its own weight. A flat spring set in the stand bears up under the hammer arm (a leaf on a
# sprung heel, stiffness 4 N m/rad, held against its stop when the arm is off it): at rest the hammer stands clear of the bell, the spring taking
# just its weight; the falling hammer drives past that, strikes, and the spring throws it off the bell again, so it lies clear while the bell rings.
# The blow, the spring and the bell are all contact. Generator: opencode-runs/batch13/gen420.py.
number: 420
slug: bell-hammer-spring
name: Arrangement of hammer for striking bells
brown: "Arrangement of hammer for striking bells. Spring below the hammer raises it out of contact with the bell after striking, and so prevents it from interfering with the vibration of the metal in the bell."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 60, duration_s: 8, floor: false}
bodies:
  - id: lever
    shape: part
    pos: [0, 0, 7]
    density: 7800
    color: "#6f6a60"
    pieces:
      - {kind: poly, points: [[-13, 6.6], [0, 6.6], [0, 7.4], [-13, 7.4]], y: [-0.4, 0.4]}   # the arm to the cord
      - {kind: poly, points: [[0.2407, 6.6805], [9.3452, 13.5412], [8.8637, 14.1801], [-0.2407, 7.3195]], y: [-0.4, 0.4], collide: 2}   # the hammer arm (the spring bears under it)
      - {kind: disc, center: [0, 7], radius: 1.1, inner: 0.3, y: [-0.5, 0.5]}
      - {kind: loft, a: [[8.1415, 0.0, 15.1385], [8.1744, 0.4141, 15.095], [8.2705, 0.8, 14.9673], [8.4236, 1.1314, 14.7642], [8.623, 1.3856, 14.4996], [8.8552, 1.5455, 14.1914], [9.1044, 1.6, 13.8607], [9.3537, 1.5455, 13.53], [9.5859, 1.3856, 13.2218], [9.7853, 1.1314, 12.9571], [9.9383, 0.8, 12.7541], [10.0345, 0.4141, 12.6264], [10.0673, 0.0, 12.5829], [10.0345, -0.4141, 12.6264], [9.9383, -0.8, 12.7541], [9.7853, -1.1314, 12.9571], [9.5859, -1.3856, 13.2218], [9.3537, -1.5455, 13.53], [9.1044, -1.6, 13.8607], [8.8552, -1.5455, 14.1914], [8.623, -1.3856, 14.4996], [8.4236, -1.1314, 14.7642], [8.2705, -0.8, 14.9673], [8.1744, -0.4141, 15.095]], b: [[11.0166, 0.0, 17.305], [11.0494, 0.4141, 17.2615], [11.1456, 0.8, 17.1338], [11.2987, 1.1314, 16.9308], [11.4981, 1.3856, 16.6661], [11.7303, 1.5455, 16.3579], [11.9795, 1.6, 16.0272], [12.2288, 1.5455, 15.6965], [12.461, 1.3856, 15.3883], [12.6604, 1.1314, 15.1237], [12.8134, 0.8, 14.9206], [12.9096, 0.4141, 14.7929], [12.9424, 0.0, 14.7494], [12.9096, -0.4141, 14.7929], [12.8134, -0.8, 14.9206], [12.6604, -1.1314, 15.1237], [12.461, -1.3856, 15.3883], [12.2288, -1.5455, 15.6965], [11.9795, -1.6, 16.0272], [11.7303, -1.5455, 16.3579], [11.4981, -1.3856, 16.6661], [11.2987, -1.1314, 16.9308], [11.1456, -0.8, 17.1338], [11.0494, -0.4141, 17.2615]], collide: 1, color: "#8f8a80"}   # the hammer head
      - {kind: rod, from: [11.9795, 0, 16.0272], to: [13.2573, 0, 16.9901], radius: 0.3}
      - {kind: disc, center: [-12.5, 6.4], radius: 0.4, inner: 0.15, y: [-0.15, 0.15]}   # the eye for the cord
  - id: leaf
    shape: part
    pos: [2.2, 0, 1.3]
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[2.3459, 1.265], [3.5459, 6.265], [3.2541, 6.335], [2.0541, 1.335]], y: [-0.35, 0.35]}   # the flat spring
      - {kind: poly, points: [[3.5222, 6.213], [6.9927, 11.0886], [6.7483, 11.2626], [3.2778, 6.387]], y: [-0.35, 0.35]}
      - {kind: disc, center: [6.8705, 11.1756], radius: 0.4, y: [-0.35, 0.35], collide: 1}   # its end, bearing under the arm
  - id: hand
    shape: part
    pos: [-12.5, 0, -4.0]
    density: 1200
    color: "#8a6a44"
    pieces:
      - {kind: rod, from: [-12.5, 0, -4.0], to: [-12.5, 0, -4.8], radius: 0.45}   # the bell-pull's handle
  - id: bell
    shape: part
    pos: [21.4743, 0, 17]
    fixed: true
    color: "#b08d57"
    pieces:
      - {kind: loft, a: [[31.4743, 0.0, 9.5], [31.2822, 1.9509, 9.5], [30.7131, 3.8268, 9.5], [29.789, 5.5557, 9.5], [28.5454, 7.0711, 9.5], [27.03, 8.3147, 9.5], [25.3011, 9.2388, 9.5], [23.4252, 9.8079, 9.5], [21.4743, 10.0, 9.5], [19.5234, 9.8079, 9.5], [17.6475, 9.2388, 9.5], [15.9186, 8.3147, 9.5], [14.4032, 7.0711, 9.5], [13.1596, 5.5557, 9.5], [12.2355, 3.8268, 9.5], [11.6664, 1.9509, 9.5], [11.4743, 0.0, 9.5], [11.6664, -1.9509, 9.5], [12.2355, -3.8268, 9.5], [13.1596, -5.5557, 9.5], [14.4032, -7.0711, 9.5], [15.9186, -8.3147, 9.5], [17.6475, -9.2388, 9.5], [19.5234, -9.8079, 9.5], [21.4743, -10.0, 9.5], [23.4252, -9.8079, 9.5], [25.3011, -9.2388, 9.5], [27.03, -8.3147, 9.5], [28.5454, -7.0711, 9.5], [29.789, -5.5557, 9.5], [30.7131, -3.8268, 9.5], [31.2822, -1.9509, 9.5]], b: [[31.1743, 0.0, 10.2], [30.9879, 1.8924, 10.2], [30.4359, 3.712, 10.2], [29.5396, 5.389, 10.2], [28.3332, 6.8589, 10.2], [26.8633, 8.0653, 10.2], [25.1863, 8.9616, 10.2], [23.3667, 9.5136, 10.2], [21.4743, 9.7, 10.2], [19.5819, 9.5136, 10.2], [17.7623, 8.9616, 10.2], [16.0853, 8.0653, 10.2], [14.6154, 6.8589, 10.2], [13.409, 5.389, 10.2], [12.5127, 3.712, 10.2], [11.9607, 1.8924, 10.2], [11.7743, 0.0, 10.2], [11.9607, -1.8924, 10.2], [12.5127, -3.712, 10.2], [13.409, -5.389, 10.2], [14.6154, -6.8589, 10.2], [16.0853, -8.0653, 10.2], [17.7623, -8.9616, 10.2], [19.5819, -9.5136, 10.2], [21.4743, -9.7, 10.2], [23.3667, -9.5136, 10.2], [25.1863, -8.9616, 10.2], [26.8633, -8.0653, 10.2], [28.3332, -6.8589, 10.2], [29.5396, -5.389, 10.2], [30.4359, -3.712, 10.2], [30.9879, -1.8924, 10.2]], collide: 2}
      - {kind: loft, a: [[31.1743, 0.0, 10.2], [30.9879, 1.8924, 10.2], [30.4359, 3.712, 10.2], [29.5396, 5.389, 10.2], [28.3332, 6.8589, 10.2], [26.8633, 8.0653, 10.2], [25.1863, 8.9616, 10.2], [23.3667, 9.5136, 10.2], [21.4743, 9.7, 10.2], [19.5819, 9.5136, 10.2], [17.7623, 8.9616, 10.2], [16.0853, 8.0653, 10.2], [14.6154, 6.8589, 10.2], [13.409, 5.389, 10.2], [12.5127, 3.712, 10.2], [11.9607, 1.8924, 10.2], [11.7743, 0.0, 10.2], [11.9607, -1.8924, 10.2], [12.5127, -3.712, 10.2], [13.409, -5.389, 10.2], [14.6154, -6.8589, 10.2], [16.0853, -8.0653, 10.2], [17.7623, -8.9616, 10.2], [19.5819, -9.5136, 10.2], [21.4743, -9.7, 10.2], [23.3667, -9.5136, 10.2], [25.1863, -8.9616, 10.2], [26.8633, -8.0653, 10.2], [28.3332, -6.8589, 10.2], [29.5396, -5.389, 10.2], [30.4359, -3.712, 10.2], [30.9879, -1.8924, 10.2]], b: [[30.3743, 0.0, 12.0], [30.2033, 1.7363, 12.0], [29.6968, 3.4059, 12.0], [28.8744, 4.9446, 12.0], [27.7676, 6.2933, 12.0], [26.4189, 7.4001, 12.0], [24.8802, 8.2225, 12.0], [23.2106, 8.729, 12.0], [21.4743, 8.9, 12.0], [19.738, 8.729, 12.0], [18.0684, 8.2225, 12.0], [16.5297, 7.4001, 12.0], [15.181, 6.2933, 12.0], [14.0742, 4.9446, 12.0], [13.2518, 3.4059, 12.0], [12.7453, 1.7363, 12.0], [12.5743, 0.0, 12.0], [12.7453, -1.7363, 12.0], [13.2518, -3.4059, 12.0], [14.0742, -4.9446, 12.0], [15.181, -6.2933, 12.0], [16.5297, -7.4001, 12.0], [18.0684, -8.2225, 12.0], [19.738, -8.729, 12.0], [21.4743, -8.9, 12.0], [23.2106, -8.729, 12.0], [24.8802, -8.2225, 12.0], [26.4189, -7.4001, 12.0], [27.7676, -6.2933, 12.0], [28.8744, -4.9446, 12.0], [29.6968, -3.4059, 12.0], [30.2033, -1.7363, 12.0]], collide: 2}
      - {kind: loft, a: [[30.3743, 0.0, 12.0], [30.2033, 1.7363, 12.0], [29.6968, 3.4059, 12.0], [28.8744, 4.9446, 12.0], [27.7676, 6.2933, 12.0], [26.4189, 7.4001, 12.0], [24.8802, 8.2225, 12.0], [23.2106, 8.729, 12.0], [21.4743, 8.9, 12.0], [19.738, 8.729, 12.0], [18.0684, 8.2225, 12.0], [16.5297, 7.4001, 12.0], [15.181, 6.2933, 12.0], [14.0742, 4.9446, 12.0], [13.2518, 3.4059, 12.0], [12.7453, 1.7363, 12.0], [12.5743, 0.0, 12.0], [12.7453, -1.7363, 12.0], [13.2518, -3.4059, 12.0], [14.0742, -4.9446, 12.0], [15.181, -6.2933, 12.0], [16.5297, -7.4001, 12.0], [18.0684, -8.2225, 12.0], [19.738, -8.729, 12.0], [21.4743, -8.9, 12.0], [23.2106, -8.729, 12.0], [24.8802, -8.2225, 12.0], [26.4189, -7.4001, 12.0], [27.7676, -6.2933, 12.0], [28.8744, -4.9446, 12.0], [29.6968, -3.4059, 12.0], [30.2033, -1.7363, 12.0]], b: [[29.4743, 0.0, 15.0], [29.3206, 1.5607, 15.0], [28.8653, 3.0615, 15.0], [28.1261, 4.4446, 15.0], [27.1312, 5.6569, 15.0], [25.9189, 6.6518, 15.0], [24.5358, 7.391, 15.0], [23.035, 7.8463, 15.0], [21.4743, 8.0, 15.0], [19.9136, 7.8463, 15.0], [18.4128, 7.391, 15.0], [17.0297, 6.6518, 15.0], [15.8174, 5.6569, 15.0], [14.8225, 4.4446, 15.0], [14.0833, 3.0615, 15.0], [13.628, 1.5607, 15.0], [13.4743, 0.0, 15.0], [13.628, -1.5607, 15.0], [14.0833, -3.0615, 15.0], [14.8225, -4.4446, 15.0], [15.8174, -5.6569, 15.0], [17.0297, -6.6518, 15.0], [18.4128, -7.391, 15.0], [19.9136, -7.8463, 15.0], [21.4743, -8.0, 15.0], [23.035, -7.8463, 15.0], [24.5358, -7.391, 15.0], [25.9189, -6.6518, 15.0], [27.1312, -5.6569, 15.0], [28.1261, -4.4446, 15.0], [28.8653, -3.0615, 15.0], [29.3206, -1.5607, 15.0]], collide: 2}
      - {kind: loft, a: [[29.4743, 0.0, 15.0], [29.3206, 1.5607, 15.0], [28.8653, 3.0615, 15.0], [28.1261, 4.4446, 15.0], [27.1312, 5.6569, 15.0], [25.9189, 6.6518, 15.0], [24.5358, 7.391, 15.0], [23.035, 7.8463, 15.0], [21.4743, 8.0, 15.0], [19.9136, 7.8463, 15.0], [18.4128, 7.391, 15.0], [17.0297, 6.6518, 15.0], [15.8174, 5.6569, 15.0], [14.8225, 4.4446, 15.0], [14.0833, 3.0615, 15.0], [13.628, 1.5607, 15.0], [13.4743, 0.0, 15.0], [13.628, -1.5607, 15.0], [14.0833, -3.0615, 15.0], [14.8225, -4.4446, 15.0], [15.8174, -5.6569, 15.0], [17.0297, -6.6518, 15.0], [18.4128, -7.391, 15.0], [19.9136, -7.8463, 15.0], [21.4743, -8.0, 15.0], [23.035, -7.8463, 15.0], [24.5358, -7.391, 15.0], [25.9189, -6.6518, 15.0], [27.1312, -5.6569, 15.0], [28.1261, -4.4446, 15.0], [28.8653, -3.0615, 15.0], [29.3206, -1.5607, 15.0]], b: [[28.6743, 0.0, 18.0], [28.536, 1.4047, 18.0], [28.1262, 2.7553, 18.0], [27.4609, 4.0001, 18.0], [26.5655, 5.0912, 18.0], [25.4744, 5.9866, 18.0], [24.2296, 6.6519, 18.0], [22.879, 7.0617, 18.0], [21.4743, 7.2, 18.0], [20.0696, 7.0617, 18.0], [18.719, 6.6519, 18.0], [17.4742, 5.9866, 18.0], [16.3831, 5.0912, 18.0], [15.4877, 4.0001, 18.0], [14.8224, 2.7553, 18.0], [14.4126, 1.4047, 18.0], [14.2743, 0.0, 18.0], [14.4126, -1.4047, 18.0], [14.8224, -2.7553, 18.0], [15.4877, -4.0001, 18.0], [16.3831, -5.0912, 18.0], [17.4742, -5.9866, 18.0], [18.719, -6.6519, 18.0], [20.0696, -7.0617, 18.0], [21.4743, -7.2, 18.0], [22.879, -7.0617, 18.0], [24.2296, -6.6519, 18.0], [25.4744, -5.9866, 18.0], [26.5655, -5.0912, 18.0], [27.4609, -4.0001, 18.0], [28.1262, -2.7553, 18.0], [28.536, -1.4047, 18.0]], collide: 2}
      - {kind: loft, a: [[28.6743, 0.0, 18.0], [28.536, 1.4047, 18.0], [28.1262, 2.7553, 18.0], [27.4609, 4.0001, 18.0], [26.5655, 5.0912, 18.0], [25.4744, 5.9866, 18.0], [24.2296, 6.6519, 18.0], [22.879, 7.0617, 18.0], [21.4743, 7.2, 18.0], [20.0696, 7.0617, 18.0], [18.719, 6.6519, 18.0], [17.4742, 5.9866, 18.0], [16.3831, 5.0912, 18.0], [15.4877, 4.0001, 18.0], [14.8224, 2.7553, 18.0], [14.4126, 1.4047, 18.0], [14.2743, 0.0, 18.0], [14.4126, -1.4047, 18.0], [14.8224, -2.7553, 18.0], [15.4877, -4.0001, 18.0], [16.3831, -5.0912, 18.0], [17.4742, -5.9866, 18.0], [18.719, -6.6519, 18.0], [20.0696, -7.0617, 18.0], [21.4743, -7.2, 18.0], [22.879, -7.0617, 18.0], [24.2296, -6.6519, 18.0], [25.4744, -5.9866, 18.0], [26.5655, -5.0912, 18.0], [27.4609, -4.0001, 18.0], [28.1262, -2.7553, 18.0], [28.536, -1.4047, 18.0]], b: [[28.1743, 0.0, 21.0], [28.0456, 1.3071, 21.0], [27.6643, 2.564, 21.0], [27.0451, 3.7223, 21.0], [26.2119, 4.7376, 21.0], [25.1966, 5.5708, 21.0], [24.0383, 6.19, 21.0], [22.7814, 6.5713, 21.0], [21.4743, 6.7, 21.0], [20.1672, 6.5713, 21.0], [18.9103, 6.19, 21.0], [17.752, 5.5708, 21.0], [16.7367, 4.7376, 21.0], [15.9035, 3.7223, 21.0], [15.2843, 2.564, 21.0], [14.903, 1.3071, 21.0], [14.7743, 0.0, 21.0], [14.903, -1.3071, 21.0], [15.2843, -2.564, 21.0], [15.9035, -3.7223, 21.0], [16.7367, -4.7376, 21.0], [17.752, -5.5708, 21.0], [18.9103, -6.19, 21.0], [20.1672, -6.5713, 21.0], [21.4743, -6.7, 21.0], [22.7814, -6.5713, 21.0], [24.0383, -6.19, 21.0], [25.1966, -5.5708, 21.0], [26.2119, -4.7376, 21.0], [27.0451, -3.7223, 21.0], [27.6643, -2.564, 21.0], [28.0456, -1.3071, 21.0]], collide: 2}
      - {kind: loft, a: [[28.1743, 0.0, 21.0], [28.0456, 1.3071, 21.0], [27.6643, 2.564, 21.0], [27.0451, 3.7223, 21.0], [26.2119, 4.7376, 21.0], [25.1966, 5.5708, 21.0], [24.0383, 6.19, 21.0], [22.7814, 6.5713, 21.0], [21.4743, 6.7, 21.0], [20.1672, 6.5713, 21.0], [18.9103, 6.19, 21.0], [17.752, 5.5708, 21.0], [16.7367, 4.7376, 21.0], [15.9035, 3.7223, 21.0], [15.2843, 2.564, 21.0], [14.903, 1.3071, 21.0], [14.7743, 0.0, 21.0], [14.903, -1.3071, 21.0], [15.2843, -2.564, 21.0], [15.9035, -3.7223, 21.0], [16.7367, -4.7376, 21.0], [17.752, -5.5708, 21.0], [18.9103, -6.19, 21.0], [20.1672, -6.5713, 21.0], [21.4743, -6.7, 21.0], [22.7814, -6.5713, 21.0], [24.0383, -6.19, 21.0], [25.1966, -5.5708, 21.0], [26.2119, -4.7376, 21.0], [27.0451, -3.7223, 21.0], [27.6643, -2.564, 21.0], [28.0456, -1.3071, 21.0]], b: [[27.7743, 0.0, 23.5], [27.6532, 1.2291, 23.5], [27.2947, 2.4109, 23.5], [26.7126, 3.5001, 23.5], [25.9291, 4.4548, 23.5], [24.9744, 5.2383, 23.5], [23.8852, 5.8204, 23.5], [22.7034, 6.1789, 23.5], [21.4743, 6.3, 23.5], [20.2452, 6.1789, 23.5], [19.0634, 5.8204, 23.5], [17.9742, 5.2383, 23.5], [17.0195, 4.4548, 23.5], [16.236, 3.5001, 23.5], [15.6539, 2.4109, 23.5], [15.2954, 1.2291, 23.5], [15.1743, 0.0, 23.5], [15.2954, -1.2291, 23.5], [15.6539, -2.4109, 23.5], [16.236, -3.5001, 23.5], [17.0195, -4.4548, 23.5], [17.9742, -5.2383, 23.5], [19.0634, -5.8204, 23.5], [20.2452, -6.1789, 23.5], [21.4743, -6.3, 23.5], [22.7034, -6.1789, 23.5], [23.8852, -5.8204, 23.5], [24.9744, -5.2383, 23.5], [25.9291, -4.4548, 23.5], [26.7126, -3.5001, 23.5], [27.2947, -2.4109, 23.5], [27.6532, -1.2291, 23.5]], collide: 2}
      - {kind: loft, a: [[27.7743, 0.0, 23.5], [27.6532, 1.2291, 23.5], [27.2947, 2.4109, 23.5], [26.7126, 3.5001, 23.5], [25.9291, 4.4548, 23.5], [24.9744, 5.2383, 23.5], [23.8852, 5.8204, 23.5], [22.7034, 6.1789, 23.5], [21.4743, 6.3, 23.5], [20.2452, 6.1789, 23.5], [19.0634, 5.8204, 23.5], [17.9742, 5.2383, 23.5], [17.0195, 4.4548, 23.5], [16.236, 3.5001, 23.5], [15.6539, 2.4109, 23.5], [15.2954, 1.2291, 23.5], [15.1743, 0.0, 23.5], [15.2954, -1.2291, 23.5], [15.6539, -2.4109, 23.5], [16.236, -3.5001, 23.5], [17.0195, -4.4548, 23.5], [17.9742, -5.2383, 23.5], [19.0634, -5.8204, 23.5], [20.2452, -6.1789, 23.5], [21.4743, -6.3, 23.5], [22.7034, -6.1789, 23.5], [23.8852, -5.8204, 23.5], [24.9744, -5.2383, 23.5], [25.9291, -4.4548, 23.5], [26.7126, -3.5001, 23.5], [27.2947, -2.4109, 23.5], [27.6532, -1.2291, 23.5]], b: [[26.8743, 0.0, 24.8], [26.7705, 1.0535, 24.8], [26.4632, 2.0665, 24.8], [25.9642, 3.0001, 24.8], [25.2927, 3.8184, 24.8], [24.4744, 4.4899, 24.8], [23.5408, 4.9889, 24.8], [22.5278, 5.2962, 24.8], [21.4743, 5.4, 24.8], [20.4208, 5.2962, 24.8], [19.4078, 4.9889, 24.8], [18.4742, 4.4899, 24.8], [17.6559, 3.8184, 24.8], [16.9844, 3.0001, 24.8], [16.4854, 2.0665, 24.8], [16.1781, 1.0535, 24.8], [16.0743, 0.0, 24.8], [16.1781, -1.0535, 24.8], [16.4854, -2.0665, 24.8], [16.9844, -3.0001, 24.8], [17.6559, -3.8184, 24.8], [18.4742, -4.4899, 24.8], [19.4078, -4.9889, 24.8], [20.4208, -5.2962, 24.8], [21.4743, -5.4, 24.8], [22.5278, -5.2962, 24.8], [23.5408, -4.9889, 24.8], [24.4744, -4.4899, 24.8], [25.2927, -3.8184, 24.8], [25.9642, -3.0001, 24.8], [26.4632, -2.0665, 24.8], [26.7705, -1.0535, 24.8]], collide: 2}
      - {kind: loft, a: [[26.8743, 0.0, 24.8], [26.7705, 1.0535, 24.8], [26.4632, 2.0665, 24.8], [25.9642, 3.0001, 24.8], [25.2927, 3.8184, 24.8], [24.4744, 4.4899, 24.8], [23.5408, 4.9889, 24.8], [22.5278, 5.2962, 24.8], [21.4743, 5.4, 24.8], [20.4208, 5.2962, 24.8], [19.4078, 4.9889, 24.8], [18.4742, 4.4899, 24.8], [17.6559, 3.8184, 24.8], [16.9844, 3.0001, 24.8], [16.4854, 2.0665, 24.8], [16.1781, 1.0535, 24.8], [16.0743, 0.0, 24.8], [16.1781, -1.0535, 24.8], [16.4854, -2.0665, 24.8], [16.9844, -3.0001, 24.8], [17.6559, -3.8184, 24.8], [18.4742, -4.4899, 24.8], [19.4078, -4.9889, 24.8], [20.4208, -5.2962, 24.8], [21.4743, -5.4, 24.8], [22.5278, -5.2962, 24.8], [23.5408, -4.9889, 24.8], [24.4744, -4.4899, 24.8], [25.2927, -3.8184, 24.8], [25.9642, -3.0001, 24.8], [26.4632, -2.0665, 24.8], [26.7705, -1.0535, 24.8]], b: [[25.6743, 0.0, 25.5], [25.5936, 0.8194, 25.5], [25.3546, 1.6073, 25.5], [24.9665, 2.3334, 25.5], [24.4441, 2.9698, 25.5], [23.8077, 3.4922, 25.5], [23.0816, 3.8803, 25.5], [22.2937, 4.1193, 25.5], [21.4743, 4.2, 25.5], [20.6549, 4.1193, 25.5], [19.867, 3.8803, 25.5], [19.1409, 3.4922, 25.5], [18.5045, 2.9698, 25.5], [17.9821, 2.3334, 25.5], [17.594, 1.6073, 25.5], [17.355, 0.8194, 25.5], [17.2743, 0.0, 25.5], [17.355, -0.8194, 25.5], [17.594, -1.6073, 25.5], [17.9821, -2.3334, 25.5], [18.5045, -2.9698, 25.5], [19.1409, -3.4922, 25.5], [19.867, -3.8803, 25.5], [20.6549, -4.1193, 25.5], [21.4743, -4.2, 25.5], [22.2937, -4.1193, 25.5], [23.0816, -3.8803, 25.5], [23.8077, -3.4922, 25.5], [24.4441, -2.9698, 25.5], [24.9665, -2.3334, 25.5], [25.3546, -1.6073, 25.5], [25.5936, -0.8194, 25.5]], collide: 2}
      - {kind: loft, a: [[31.121, 0.0, 10.5], [30.9356, 1.882, 10.5], [30.3867, 3.6916, 10.5], [29.4952, 5.3594, 10.5], [28.2955, 6.8212, 10.5], [26.8337, 8.0209, 10.5], [25.1659, 8.9124, 10.5], [23.3563, 9.4613, 10.5], [21.4743, 9.6467, 10.5], [19.5923, 9.4613, 10.5], [17.7827, 8.9124, 10.5], [16.1149, 8.0209, 10.5], [14.6531, 6.8212, 10.5], [13.4534, 5.3594, 10.5], [12.5619, 3.6916, 10.5], [12.013, 1.882, 10.5], [11.8276, 0.0, 10.5], [12.013, -1.882, 10.5], [12.5619, -3.6916, 10.5], [13.4534, -5.3594, 10.5], [14.6531, -6.8212, 10.5], [16.1149, -8.0209, 10.5], [17.7827, -8.9124, 10.5], [19.5923, -9.4613, 10.5], [21.4743, -9.6467, 10.5], [23.3563, -9.4613, 10.5], [25.1659, -8.9124, 10.5], [26.8337, -8.0209, 10.5], [28.2955, -6.8212, 10.5], [29.4952, -5.3594, 10.5], [30.3867, -3.6916, 10.5], [30.9356, -1.882, 10.5]], b: [[30.9432, 0.0, 10.9], [30.7612, 1.8473, 10.9], [30.2224, 3.6236, 10.9], [29.3474, 5.2606, 10.9], [28.1698, 6.6955, 10.9], [26.7349, 7.8731, 10.9], [25.0979, 8.7481, 10.9], [23.3216, 9.2869, 10.9], [21.4743, 9.4689, 10.9], [19.627, 9.2869, 10.9], [17.8507, 8.7481, 10.9], [16.2137, 7.8731, 10.9], [14.7788, 6.6955, 10.9], [13.6012, 5.2606, 10.9], [12.7262, 3.6236, 10.9], [12.1874, 1.8473, 10.9], [12.0054, 0.0, 10.9], [12.1874, -1.8473, 10.9], [12.7262, -3.6236, 10.9], [13.6012, -5.2606, 10.9], [14.7788, -6.6955, 10.9], [16.2137, -7.8731, 10.9], [17.8507, -8.7481, 10.9], [19.627, -9.2869, 10.9], [21.4743, -9.4689, 10.9], [23.3216, -9.2869, 10.9], [25.0979, -8.7481, 10.9], [26.7349, -7.8731, 10.9], [28.1698, -6.6955, 10.9], [29.3474, -5.2606, 10.9], [30.2224, -3.6236, 10.9], [30.7612, -1.8473, 10.9]], color: "#8a6c3e"}
      - {kind: loft, a: [[28.371, 0.0, 20.3], [28.2384, 1.3455, 20.3], [27.846, 2.6392, 20.3], [27.2087, 3.8316, 20.3], [26.351, 4.8767, 20.3], [25.3059, 5.7344, 20.3], [24.1135, 6.3717, 20.3], [22.8198, 6.7641, 20.3], [21.4743, 6.8967, 20.3], [20.1288, 6.7641, 20.3], [18.8351, 6.3717, 20.3], [17.6427, 5.7344, 20.3], [16.5976, 4.8767, 20.3], [15.7399, 3.8316, 20.3], [15.1026, 2.6392, 20.3], [14.7102, 1.3455, 20.3], [14.5776, 0.0, 20.3], [14.7102, -1.3455, 20.3], [15.1026, -2.6392, 20.3], [15.7399, -3.8316, 20.3], [16.5976, -4.8767, 20.3], [17.6427, -5.7344, 20.3], [18.8351, -6.3717, 20.3], [20.1288, -6.7641, 20.3], [21.4743, -6.8967, 20.3], [22.8198, -6.7641, 20.3], [24.1135, -6.3717, 20.3], [25.3059, -5.7344, 20.3], [26.351, -4.8767, 20.3], [27.2087, -3.8316, 20.3], [27.846, -2.6392, 20.3], [28.2384, -1.3455, 20.3]], b: [[28.321, 0.0, 20.6], [28.1894, 1.3357, 20.6], [27.7998, 2.6201, 20.6], [27.1671, 3.8038, 20.6], [26.3156, 4.8413, 20.6], [25.2781, 5.6928, 20.6], [24.0944, 6.3255, 20.6], [22.81, 6.7151, 20.6], [21.4743, 6.8467, 20.6], [20.1386, 6.7151, 20.6], [18.8542, 6.3255, 20.6], [17.6705, 5.6928, 20.6], [16.633, 4.8413, 20.6], [15.7815, 3.8038, 20.6], [15.1488, 2.6201, 20.6], [14.7592, 1.3357, 20.6], [14.6276, 0.0, 20.6], [14.7592, -1.3357, 20.6], [15.1488, -2.6201, 20.6], [15.7815, -3.8038, 20.6], [16.633, -4.8413, 20.6], [17.6705, -5.6928, 20.6], [18.8542, -6.3255, 20.6], [20.1386, -6.7151, 20.6], [21.4743, -6.8467, 20.6], [22.81, -6.7151, 20.6], [24.0944, -6.3255, 20.6], [25.2781, -5.6928, 20.6], [26.3156, -4.8413, 20.6], [27.1671, -3.8038, 20.6], [27.7998, -2.6201, 20.6], [28.1894, -1.3357, 20.6]], color: "#8a6c3e"}
      - {kind: loft, a: [[28.2543, 0.0, 21.0], [28.124, 1.3227, 21.0], [27.7382, 2.5946, 21.0], [27.1117, 3.7668, 21.0], [26.2685, 4.7942, 21.0], [25.2411, 5.6374, 21.0], [24.0689, 6.2639, 21.0], [22.797, 6.6497, 21.0], [21.4743, 6.78, 21.0], [20.1516, 6.6497, 21.0], [18.8797, 6.2639, 21.0], [17.7075, 5.6374, 21.0], [16.6801, 4.7942, 21.0], [15.8369, 3.7668, 21.0], [15.2104, 2.5946, 21.0], [14.8246, 1.3227, 21.0], [14.6943, 0.0, 21.0], [14.8246, -1.3227, 21.0], [15.2104, -2.5946, 21.0], [15.8369, -3.7668, 21.0], [16.6801, -4.7942, 21.0], [17.7075, -5.6374, 21.0], [18.8797, -6.2639, 21.0], [20.1516, -6.6497, 21.0], [21.4743, -6.78, 21.0], [22.797, -6.6497, 21.0], [24.0689, -6.2639, 21.0], [25.2411, -5.6374, 21.0], [26.2685, -4.7942, 21.0], [27.1117, -3.7668, 21.0], [27.7382, -2.5946, 21.0], [28.124, -1.3227, 21.0]], b: [[28.2063, 0.0, 21.3], [28.0769, 1.3133, 21.3], [27.6939, 2.5762, 21.3], [27.0718, 3.7401, 21.3], [26.2345, 4.7602, 21.3], [25.2144, 5.5975, 21.3], [24.0505, 6.2196, 21.3], [22.7876, 6.6026, 21.3], [21.4743, 6.732, 21.3], [20.161, 6.6026, 21.3], [18.8981, 6.2196, 21.3], [17.7342, 5.5975, 21.3], [16.7141, 4.7602, 21.3], [15.8768, 3.7401, 21.3], [15.2547, 2.5762, 21.3], [14.8717, 1.3133, 21.3], [14.7423, 0.0, 21.3], [14.8717, -1.3133, 21.3], [15.2547, -2.5762, 21.3], [15.8768, -3.7401, 21.3], [16.7141, -4.7602, 21.3], [17.7342, -5.5975, 21.3], [18.8981, -6.2196, 21.3], [20.161, -6.6026, 21.3], [21.4743, -6.732, 21.3], [22.7876, -6.6026, 21.3], [24.0505, -6.2196, 21.3], [25.2144, -5.5975, 21.3], [26.2345, -4.7602, 21.3], [27.0718, -3.7401, 21.3], [27.6939, -2.5762, 21.3], [28.0769, -1.3133, 21.3]], color: "#8a6c3e"}
      - {kind: rod, from: [19.8743, 0, 25.3], to: [20.1743, 0, 28.6], radius: 0.45}   # the bell's loop
      - {kind: rod, from: [23.0743, 0, 25.3], to: [22.7743, 0, 28.6], radius: 0.45}
      - {kind: rod, from: [19.9743, 0, 28.6], to: [22.9743, 0, 28.6], radius: 0.45}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#c9b48a"
    pieces:
      - {kind: poly, points: [[-10.5, -4.5], [31.4743, -4.5], [31.4743, 0], [-10.5, 0]], y: [-3, 5]}   # the plank
      - {kind: poly, points: [[-3.5, 0], [2.2, 0], [2.2, 9.6], [-3.5, 9.6]], y: [0.8, 1.8], color: "#b8ad97"}   # the stand
      - {kind: poly, points: [[-1.5, 0], [2.8, 0], [2.8, 1.8], [-1.5, 1.8]], y: [-1.2, 0.8], color: "#a39d90"}   # the spring's seat
      - {kind: rod, from: [0, -0.6, 7], to: [0, 0.8, 7], radius: 0.3, color: "#5a564e"}   # the stud
joints:
  - {id: j_L, type: hinge, body: lever, axis: [0, -1, 0], damping: 0.005}   # the lever and hammer; + : anticlockwise (the hammer back from the bell)
  - {id: j_S, type: hinge, body: leaf, axis: [0, -1, 0], stiffness: 4, springref: 0.066, range: [-0.3, 0.03], damping: 0.01}   # the spring; + : up under the arm
  - {id: j_h, type: slide, body: hand, axis: [0, 0, -1], range: [-2.0, 2.6], damping: 0.05}   # the hand on the cord: the one driven joint; + : drawn down
cords:
  - id: cord
    from: {body: lever, at: [-12.5, 0, 6.4]}
    to: {body: hand, at: [-12.5, 0, -4.0]}
    links: 12
    root_damping: 0.0001
    joint_armature: 0.000001
    thickness: 0.4
    stiffness: 8000
    damping: 2.0
    color: "#6f5a3c"
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_h, kind: feet, feet: {joints: [j_h], sign: [1], force: 3, hz: 0.5}, max_torque: 6}
checks:
  # the hammer strikes the bell (-0.04 rad from rest) every pull and never passes it, and is drawn back each time
  - {type: position, joint: j_L, min: -0.0425, max: 0.27, settle_s: 0.5, window_s: 7}
  - {type: clicks, joint: j_L, lift: 0.2, min: 3, settle_s: 0.5, window_s: 7}
  # after each blow the spring throws it off and it lies clear of the bell (at rest just -0.04 + ~0.033 rad: ~4 mm clear)
  - {type: position, joint: j_L, min: -0.015, max: 0.0, settle_s: 1.4, window_s: 0.55}
  - {type: position, joint: j_L, min: -0.015, max: 0.0, settle_s: 3.4, window_s: 0.55}
  - {type: position, joint: j_L, min: -0.015, max: 0.0, settle_s: 5.4, window_s: 0.55}
  - {type: penetration, max: 0.0025, settle_s: 0.5}
camera: {target: [4.23715, 0, 11], position: [4.23715, -150, 11], fov: 20}
display:
  output: j_L
  labels: {j_h: "The hand on the cord", j_L: "Lever and hammer", j_S: "The spring"}
