# No. 405 (Brown 1868): "Mechanical means of describing hyperbolas, their foci and vertices being given. Suppose the curves two opposite hyperbolas, the
# points in vertical dotted center line their foci. One end of rule turns on one focus as a center through which one edge ranges. One end of thread
# being looped on pin inserted at the other focus, and other end held to other end of rule, with just enough slack between to permit height to reach
# vortex when rule coincides with center line. A pencil held in bight, and kept close to rule while latter is moved from center line, describes one-half
# of parabola; the rule is then reversed for the other half."
#
# Model (cm, a plan: the instrument lies flat on the drawing, so no gravity). Foci 21 apart, vertices 15 apart. The rule turns on a pin at the
# upper focus; the hand turning it is the one driven joint (to and fro, 7 degrees either way about -20 degrees from the axis).
# A thread (a chain of links on real contact) is tied to a pin at the lower focus and to the rule's end, 34 from its pin, and is taken round
# the pencil. The pencil rides along the rule's edge (a slide on the rule) and the other hand draws it towards the rule's pin with a light spring,
# so the thread is kept tight: the pencil is held where it is by nothing but the thread. The thread from the rule's end lies along the edge, so the
# pencil's distance from the rule's pin less its distance from the lower focus stays the thread's shortfall on the rule: a hyperbola.
# A light readout from the lower focus, pinned at the pencil, records its distance from that focus; it carries nothing.
# Generator: opencode-runs/batch13/gen405.py.
number: 405
slug: hyperbola-instrument
name: Mechanical means of describing hyperbolas
brown: "Mechanical means of describing hyperbolas, their foci and vertices being given. Suppose the curves two opposite hyperbolas, the points in vertical dotted center line their foci. One end of rule turns on one focus as a center through which one edge ranges. One end of thread being looped on pin inserted at the other focus, and other end held to other end of rule, with just enough slack between to permit height to reach vortex when rule coincides with center line. A pencil held in bight, and kept close to rule while latter is moved from center line, describes one-half of parabola; the rule is then reversed for the other half."
units: cm
sim: {timestep: 5e-05, integrator: implicitfast, iterations: 60, duration_s: 10.5, floor: false, gravity: 0}
bodies:
  - id: paper
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#efe8d8"
    pieces:
      - {kind: poly, points: [[-13.0, 15.1911], [-12.35, 14.6172], [-12.35, 14.7172], [-13.0, 15.2911]], y: [0.55, 0.6], color: "#3a3632"}   # the hyperbola, both branches
      - {kind: poly, points: [[-12.35, 14.6172], [-11.7, 14.0512], [-11.7, 14.1512], [-12.35, 14.7172]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-11.7, 14.0512], [-11.05, 13.494], [-11.05, 13.594], [-11.7, 14.1512]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-11.05, 13.494], [-10.4, 12.9468], [-10.4, 13.0468], [-11.05, 13.594]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-10.4, 12.9468], [-9.75, 12.4109], [-9.75, 12.5109], [-10.4, 13.0468]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-9.75, 12.4109], [-9.1, 11.8878], [-9.1, 11.9878], [-9.75, 12.5109]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-9.1, 11.8878], [-8.45, 11.3792], [-8.45, 11.4792], [-9.1, 11.9878]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-8.45, 11.3792], [-7.8, 10.8873], [-7.8, 10.9873], [-8.45, 11.4792]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-7.8, 10.8873], [-7.15, 10.4143], [-7.15, 10.5143], [-7.8, 10.9873]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-7.15, 10.4143], [-6.5, 9.963], [-6.5, 10.063], [-7.15, 10.5143]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-6.5, 9.963], [-5.85, 9.5364], [-5.85, 9.6364], [-6.5, 10.063]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-5.85, 9.5364], [-5.2, 9.1379], [-5.2, 9.2379], [-5.85, 9.6364]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-5.2, 9.1379], [-4.55, 8.7713], [-4.55, 8.8713], [-5.2, 9.2379]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-4.55, 8.7713], [-3.9, 8.4408], [-3.9, 8.5408], [-4.55, 8.8713]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-3.9, 8.4408], [-3.25, 8.1508], [-3.25, 8.2508], [-3.9, 8.5408]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-3.25, 8.1508], [-2.6, 7.9056], [-2.6, 8.0056], [-3.25, 8.2508]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-2.6, 7.9056], [-1.95, 7.7096], [-1.95, 7.8096], [-2.6, 8.0056]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-1.95, 7.7096], [-1.3, 7.5665], [-1.3, 7.6665], [-1.95, 7.8096]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-1.3, 7.5665], [-0.65, 7.4793], [-0.65, 7.5793], [-1.3, 7.6665]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-0.65, 7.4793], [0.0, 7.45], [0.0, 7.55], [-0.65, 7.5793]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[0.0, 7.45], [0.65, 7.4793], [0.65, 7.5793], [0.0, 7.55]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[0.65, 7.4793], [1.3, 7.5665], [1.3, 7.6665], [0.65, 7.5793]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[1.3, 7.5665], [1.95, 7.7096], [1.95, 7.8096], [1.3, 7.6665]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[1.95, 7.7096], [2.6, 7.9056], [2.6, 8.0056], [1.95, 7.8096]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[2.6, 7.9056], [3.25, 8.1508], [3.25, 8.2508], [2.6, 8.0056]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[3.25, 8.1508], [3.9, 8.4408], [3.9, 8.5408], [3.25, 8.2508]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[3.9, 8.4408], [4.55, 8.7713], [4.55, 8.8713], [3.9, 8.5408]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[4.55, 8.7713], [5.2, 9.1379], [5.2, 9.2379], [4.55, 8.8713]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[5.2, 9.1379], [5.85, 9.5364], [5.85, 9.6364], [5.2, 9.2379]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[5.85, 9.5364], [6.5, 9.963], [6.5, 10.063], [5.85, 9.6364]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[6.5, 9.963], [7.15, 10.4143], [7.15, 10.5143], [6.5, 10.063]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[7.15, 10.4143], [7.8, 10.8873], [7.8, 10.9873], [7.15, 10.5143]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[7.8, 10.8873], [8.45, 11.3792], [8.45, 11.4792], [7.8, 10.9873]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[8.45, 11.3792], [9.1, 11.8878], [9.1, 11.9878], [8.45, 11.4792]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[9.1, 11.8878], [9.75, 12.4109], [9.75, 12.5109], [9.1, 11.9878]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[9.75, 12.4109], [10.4, 12.9468], [10.4, 13.0468], [9.75, 12.5109]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[10.4, 12.9468], [11.05, 13.494], [11.05, 13.594], [10.4, 13.0468]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[11.05, 13.494], [11.7, 14.0512], [11.7, 14.1512], [11.05, 13.594]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[11.7, 14.0512], [12.35, 14.6172], [12.35, 14.7172], [11.7, 14.1512]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[12.35, 14.6172], [13.0, 15.1911], [13.0, 15.2911], [12.35, 14.7172]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-13.0, -15.2911], [-12.35, -14.7172], [-12.35, -14.6172], [-13.0, -15.1911]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-12.35, -14.7172], [-11.7, -14.1512], [-11.7, -14.0512], [-12.35, -14.6172]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-11.7, -14.1512], [-11.05, -13.594], [-11.05, -13.494], [-11.7, -14.0512]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-11.05, -13.594], [-10.4, -13.0468], [-10.4, -12.9468], [-11.05, -13.494]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-10.4, -13.0468], [-9.75, -12.5109], [-9.75, -12.4109], [-10.4, -12.9468]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-9.75, -12.5109], [-9.1, -11.9878], [-9.1, -11.8878], [-9.75, -12.4109]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-9.1, -11.9878], [-8.45, -11.4792], [-8.45, -11.3792], [-9.1, -11.8878]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-8.45, -11.4792], [-7.8, -10.9873], [-7.8, -10.8873], [-8.45, -11.3792]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-7.8, -10.9873], [-7.15, -10.5143], [-7.15, -10.4143], [-7.8, -10.8873]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-7.15, -10.5143], [-6.5, -10.063], [-6.5, -9.963], [-7.15, -10.4143]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-6.5, -10.063], [-5.85, -9.6364], [-5.85, -9.5364], [-6.5, -9.963]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-5.85, -9.6364], [-5.2, -9.2379], [-5.2, -9.1379], [-5.85, -9.5364]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-5.2, -9.2379], [-4.55, -8.8713], [-4.55, -8.7713], [-5.2, -9.1379]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-4.55, -8.8713], [-3.9, -8.5408], [-3.9, -8.4408], [-4.55, -8.7713]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-3.9, -8.5408], [-3.25, -8.2508], [-3.25, -8.1508], [-3.9, -8.4408]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-3.25, -8.2508], [-2.6, -8.0056], [-2.6, -7.9056], [-3.25, -8.1508]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-2.6, -8.0056], [-1.95, -7.8096], [-1.95, -7.7096], [-2.6, -7.9056]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-1.95, -7.8096], [-1.3, -7.6665], [-1.3, -7.5665], [-1.95, -7.7096]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-1.3, -7.6665], [-0.65, -7.5793], [-0.65, -7.4793], [-1.3, -7.5665]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-0.65, -7.5793], [0.0, -7.55], [0.0, -7.45], [-0.65, -7.4793]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[0.0, -7.55], [0.65, -7.5793], [0.65, -7.4793], [0.0, -7.45]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[0.65, -7.5793], [1.3, -7.6665], [1.3, -7.5665], [0.65, -7.4793]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[1.3, -7.6665], [1.95, -7.8096], [1.95, -7.7096], [1.3, -7.5665]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[1.95, -7.8096], [2.6, -8.0056], [2.6, -7.9056], [1.95, -7.7096]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[2.6, -8.0056], [3.25, -8.2508], [3.25, -8.1508], [2.6, -7.9056]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[3.25, -8.2508], [3.9, -8.5408], [3.9, -8.4408], [3.25, -8.1508]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[3.9, -8.5408], [4.55, -8.8713], [4.55, -8.7713], [3.9, -8.4408]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[4.55, -8.8713], [5.2, -9.2379], [5.2, -9.1379], [4.55, -8.7713]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[5.2, -9.2379], [5.85, -9.6364], [5.85, -9.5364], [5.2, -9.1379]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[5.85, -9.6364], [6.5, -10.063], [6.5, -9.963], [5.85, -9.5364]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[6.5, -10.063], [7.15, -10.5143], [7.15, -10.4143], [6.5, -9.963]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[7.15, -10.5143], [7.8, -10.9873], [7.8, -10.8873], [7.15, -10.4143]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[7.8, -10.9873], [8.45, -11.4792], [8.45, -11.3792], [7.8, -10.8873]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[8.45, -11.4792], [9.1, -11.9878], [9.1, -11.8878], [8.45, -11.3792]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[9.1, -11.9878], [9.75, -12.5109], [9.75, -12.4109], [9.1, -11.8878]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[9.75, -12.5109], [10.4, -13.0468], [10.4, -12.9468], [9.75, -12.4109]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[10.4, -13.0468], [11.05, -13.594], [11.05, -13.494], [10.4, -12.9468]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[11.05, -13.594], [11.7, -14.1512], [11.7, -14.0512], [11.05, -13.494]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[11.7, -14.1512], [12.35, -14.7172], [12.35, -14.6172], [11.7, -14.0512]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[12.35, -14.7172], [13.0, -15.2911], [13.0, -15.1911], [12.35, -14.6172]], y: [0.55, 0.6], color: "#3a3632"}
      - {kind: poly, points: [[-12.0, -0.03], [-11.0, -0.03], [-11.0, 0.03], [-12.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}   # the axes, dotted
      - {kind: poly, points: [[-0.03, -12.0], [0.03, -12.0], [0.03, -11.0], [-0.03, -11.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-10.0, -0.03], [-9.0, -0.03], [-9.0, 0.03], [-10.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, -10.0], [0.03, -10.0], [0.03, -9.0], [-0.03, -9.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-8.0, -0.03], [-7.0, -0.03], [-7.0, 0.03], [-8.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, -8.0], [0.03, -8.0], [0.03, -7.0], [-0.03, -7.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-6.0, -0.03], [-5.0, -0.03], [-5.0, 0.03], [-6.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, -6.0], [0.03, -6.0], [0.03, -5.0], [-0.03, -5.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-4.0, -0.03], [-3.0, -0.03], [-3.0, 0.03], [-4.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, -4.0], [0.03, -4.0], [0.03, -3.0], [-0.03, -3.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-2.0, -0.03], [-1.0, -0.03], [-1.0, 0.03], [-2.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, -2.0], [0.03, -2.0], [0.03, -1.0], [-0.03, -1.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[0.0, -0.03], [1.0, -0.03], [1.0, 0.03], [0.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 0.0], [0.03, 0.0], [0.03, 1.0], [-0.03, 1.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[2.0, -0.03], [3.0, -0.03], [3.0, 0.03], [2.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 2.0], [0.03, 2.0], [0.03, 3.0], [-0.03, 3.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[4.0, -0.03], [5.0, -0.03], [5.0, 0.03], [4.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 4.0], [0.03, 4.0], [0.03, 5.0], [-0.03, 5.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[6.0, -0.03], [7.0, -0.03], [7.0, 0.03], [6.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 6.0], [0.03, 6.0], [0.03, 7.0], [-0.03, 7.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[8.0, -0.03], [9.0, -0.03], [9.0, 0.03], [8.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 8.0], [0.03, 8.0], [0.03, 9.0], [-0.03, 9.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[10.0, -0.03], [11.0, -0.03], [11.0, 0.03], [10.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 10.0], [0.03, 10.0], [0.03, 11.0], [-0.03, 11.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[12.0, -0.03], [13.0, -0.03], [13.0, 0.03], [12.0, 0.03]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: poly, points: [[-0.03, 12.0], [0.03, 12.0], [0.03, 13.0], [-0.03, 13.0]], y: [0.55, 0.6], color: "#8f8a80"}
      - {kind: disc, center: [0, 10.5], radius: 0.3, y: [-1.2, 0.55], color: "#5c5244"}   # the pin the rule turns on, at one focus
      - {kind: disc, center: [0, -10.5], radius: 0.3, y: [-1.2, 0.55], color: "#5c5244"}   # the pin at the other focus, the thread tied to it
  - id: rule
    shape: part
    pos: [0, 0, 10.5]
    density: 700
    color: "#e6dcc4"
    pieces:
      - {kind: poly, points: [[0.4533, 12.0377], [-12.1331, -22.543], [-13.6366, -21.9957], [-1.0502, 12.5849]], y: [-0.4, 0.4]}   # the straight rule
      - {kind: disc, center: [0, 10.5], radius: 0.75, inner: 0.32, y: [-0.6, -0.4], color: "#8f8a80"}   # its eye on the pin
      - {kind: disc, center: [-11.6287, -21.4495], radius: 0.25, y: [-0.6, 0.4], color: "#8f8a80"}   # the thread's tie at its end
  - {id: pencil, shape: pulley, radius: 0.35, width: 0.8, pos: [-7.3806, 0, -11.0938], mount: rule, mass: 0.004, spokes: 0, web: true, flange: 0.35, groove: 0.4, hub: 0.15, touch: {side: 1, friction: 0.05}, color: "#3a3632"}
  - {id: rd_arm, shape: part, pos: [0, 0, -10.5], mass: 0.002, pieces: [{kind: rod, from: [0, -2, -10.5], to: [0, -1.95, -10.5], radius: 0.05}]}
  - {id: rd_rad, shape: part, pos: [-7.3806, 0, -11.0938], mount: rd_arm, mass: 0.002, pieces: [{kind: rod, from: [-7.3806, -2, -11.0938], to: [-7.3806, -1.95, -11.0938], radius: 0.05}]}
pins:
  - {id: p_read, a: rd_rad, b: pencil, at: [-7.3806, 0, -11.0938]}   # the readout at the pencil
joints:
  - {id: j_rule, type: hinge, body: rule, axis: [0, 1, 0], damping: 0.002}   # the one driven joint: the hand turns the rule on its pin
  - {id: j_s, type: slide, body: pencil, axis: [-0.342020, 0, -0.939693], stiffness: 2, springref: -30, damping: 0.05}   # the pencil along the rule's edge, drawn towards the pin
  - {id: j_rd, type: hinge, body: rd_arm, axis: [0, 1, 0]}   # readout: the pencil's bearing from the lower focus
  - {id: j_r, type: slide, body: rd_rad, axis: [-0.996779, 0, -0.080198]}   # readout: the pencil's distance from the lower focus, less 7.404
cords:
  - id: thread
    from: {body: paper, at: [0, 0, -10.5]}
    to: {body: rule, at: [-11.6287, 0, -21.4495]}
    over: [pencil]
    under: [pencil]
    links: 70
    segments: 1
    root_damping: 0.0001
    joint_armature: 1e-06
    thickness: 0.2
    density: 5000
    stiffness: 60000
    pretension: 1
    damping: 2
    bend_damping: 1e-06
    friction: 0.05
    color: "#7a4f2a"
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_rule, kind: velocity, rpm: 0, swing: {amplitude: 0.1218, hz: 0.2}, kv: 50, max_torque: 10}
checks:
  - {type: follow, out: j_r, in: j_s, expect: 1.0, tol: 0.12, min_r2: 0.99, settle_s: 0.5, window_s: 6}   # the pencil gains on F1 exactly what it loses on F2: the difference of the focal radii is constant (thread wraps the pencil, so ~1.09)
  - {type: amplitude, joint: j_rule, min: 0.07, max: 0.4, sustain: 0.7, settle_s: 0.5, window_s: 6}   # the rule swept well round F1
  - {type: penetration, max: 0.004, settle_s: 0.5}
camera: {target: [-3, 0, -13.8], position: [-3, -80, -13.8], fov: 46}
display:
  output: j_r
  labels: {j_rule: "The hand turning the rule (driver)", j_s: "Pencil along the rule", j_rd: "Pencil's bearing from the lower focus", j_r: "Pencil's distance from the lower focus"}

