# No. 294 (Brown 1868): "294 and 295. A cylinder escapement. 294 shows the cylinder in perspective, and 295 shows part of the escape-wheel on a large scale, and represents the different positions taken by cylinder, A, B, during an oscillation. The pallets, a, b, c, on the wheel rest alternately on the inside and outside of cylinder. To the top of cylinder is attached the balance-wheel. The wheel pallets are beveled so as to keep up the impulse of balance by sliding against the beveled edge of cylinder."
#
# Model (cm, a plan of the watch: gravity off). The cylinder (outside r 1, inside r 0.85) is the balance's axis, at the origin; at the wedges' level a little more than half of it
# is left (217 degrees, over the top), its two edges being the lips. The escape-wheel (15 teeth, axis 8.55 below, clockwise) carries on stalks its pallets a, b, c:
# wedges 1.55 long, the point leading, rising 0.3 to the heel, so that their path passes through the cylinder. A point rests on the cylinder's outside; when the balance turns
# clockwise far enough the entry lip passes it, and the wedge slides under the lip and pushes it (the impulse); the point goes in and rests on the inside. Swinging back, the
# exit lip passes the point, the wedge slides out under that lip (a second impulse) and the next point falls on the outside. The shell is built of 22 convex pieces
# whose inner ends taper in, so a resting point never meets a join. Only the wheel is driven (the mainspring). The balance is let go 2.2 rad from its rest. Generator: opencode-runs/batch12/gen295.py.
number: 294
slug: cylinder-escapement-perspective
name: Cylinder escapement, the cylinder in perspective
brown: "294 and 295. A cylinder escapement. 294 shows the cylinder in perspective, and 295 shows part of the escape-wheel on a large scale, and represents the different positions taken by cylinder, A, B, during an oscillation. The pallets, a, b, c, on the wheel rest alternately on the inside and outside of cylinder. To the top of cylinder is attached the balance-wheel. The wheel pallets are beveled so as to keep up the impulse of balance by sliding against the beveled edge of cylinder."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 50, duration_s: 12, floor: false, gravity: 0}
bodies:
  - id: wheel
    shape: part
    pos: [0, 0, -8.55]
    mass: 0.006
    friction: 0.1
    color: "#e6d7b0"
    pieces:
      - {kind: disc, center: [0, -8.55], radius: 6.9, inner: 6.5, y: [-0.15, 0.15]}   # the rim
      - {kind: disc, center: [0, -8.55], radius: 1.0, y: [-0.15, 0.15]}   # the hub
      - {kind: poly, points: [[0.98995, -8.12574], [5.02046, -4.09523], [4.45477, -3.52954], [0.42426, -7.56005]], y: [-0.15, 0.15]}   # a spoke
      - {kind: poly, points: [[-0.42426, -7.56005], [-4.45477, -3.52954], [-5.02046, -4.09523], [-0.98995, -8.12574]], y: [-0.15, 0.15]}   # a spoke
      - {kind: poly, points: [[-0.98995, -8.97426], [-5.02046, -13.00477], [-4.45477, -13.57046], [-0.42426, -9.53995]], y: [-0.15, 0.15]}   # a spoke
      - {kind: poly, points: [[0.42426, -9.53995], [4.45477, -13.57046], [5.02046, -13.00477], [0.98995, -8.97426]], y: [-0.15, 0.15]}   # a spoke
      - {kind: disc, center: [0, -8.55], radius: 0.3, y: [-0.6, 0.8], color: "#8f8a80"}   # its arbor
      - {kind: poly, points: [[-1.5992, -1.94072], [-2.00564, -2.05251], [-2.48345, -0.50457], [-2.25183, -0.4367]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-4.14918, -3.16258], [-4.47501, -3.43001], [-5.54112, -2.21025], [-5.35712, -2.05403]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-5.98172, -5.31596], [-6.17061, -5.69281], [-7.64067, -5.01212], [-7.53613, -4.79457]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-6.77998, -8.02855], [-6.79926, -8.44964], [-8.41908, -8.42573], [-8.41206, -8.18447]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-6.40591, -10.83129], [-6.25225, -11.22382], [-7.74176, -11.86082], [-7.83348, -11.63756]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-4.9242, -13.23959], [-4.62418, -13.53568], [-5.72582, -14.72344], [-5.90041, -14.55679]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-2.59106, -14.837], [-2.19654, -14.98547], [-2.71983, -16.51862], [-2.94711, -16.43739]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[0.1901, -15.34734], [0.6109, -15.3225], [0.75644, -16.93595], [0.51577, -16.95419]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[2.9384, -14.68236], [3.31271, -14.48851], [4.10192, -15.90327], [3.88947, -16.01783]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[5.17861, -12.95703], [5.44173, -12.6277], [6.73814, -13.59915], [6.59065, -13.79021]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[6.5234, -10.46969], [6.62981, -10.06181], [8.20927, -10.42198], [8.15224, -10.65651]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[6.74023, -7.65042], [6.67155, -7.23452], [8.26094, -6.92113], [8.30424, -7.15858]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[5.79162, -4.98669], [5.55971, -4.63469], [6.88423, -3.70192], [7.02036, -3.90124]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[3.84158, -2.93909], [3.48654, -2.71185], [4.31716, -1.321], [4.52259, -1.44771]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[1.2273, -1.86167], [0.81053, -1.79848], [1.00362, -0.19003], [1.24283, -0.22223]], y: [-0.12, 0.12]}   # a stalk
      - {kind: poly, points: [[-0.98191, -0.20759], [-2.58503, -0.24292], [-2.49589, -0.52937]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge) a
      - {kind: poly, points: [[-4.29018, -1.3282], [-5.74034, -2.01253], [-5.5424, -2.23796]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-6.85665, -3.69754], [-7.90309, -4.91253], [-7.63057, -5.03796]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-8.23753, -6.9059], [-8.69932, -8.44148], [-8.39935, -8.44522]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-8.19408, -10.39855], [-7.99137, -11.9892], [-7.7158, -11.8706]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-6.73379, -13.57156], [-5.90163, -14.94224], [-5.69812, -14.72182]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-4.10917, -15.87631], [-2.79145, -16.79001], [-2.69519, -16.50588]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[-0.77403, -16.91426], [0.8014, -17.21301], [0.77377, -16.91429]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[2.69494, -16.50596], [4.25568, -16.13809], [4.10893, -15.87644]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[5.69793, -14.722], [6.97411, -13.75113], [6.73363, -13.57178]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[7.7157, -11.87085], [8.48666, -10.46484], [8.19402, -10.39881]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[8.39935, -8.44549], [8.53178, -6.84746], [8.23759, -6.90617]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[7.63068, -5.0382], [7.10169, -3.52446], [6.8568, -3.69775]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[5.5426, -2.23814], [4.44364, -1.07042], [4.29041, -1.32834]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
      - {kind: poly, points: [[2.49615, -0.52945], [1.01725, 0.09032], [0.98217, -0.20762]], y: [-0.12, 0.12], collide: 2, color: "#c9a15a"}   # a pallet (wedge)
  - id: balance
    shape: part
    pos: [0, 0, 0]
    mass: 0.075
    friction: 0.1
    color: "#d9c49a"
    pieces:
      - {kind: disc, center: [0, 0], radius: 3.6, inner: 3.1, y: [0.8, 1.2]}   # the balance-wheel's rim (on the cylinder's top)
      - {kind: poly, points: [[-0.33082, -0.05528], [-2.67546, -1.76193], [-2.49891, -2.00448], [-0.15427, -0.29782]], y: [0.85, 1.15]}   # an arm of the balance-wheel
      - {kind: poly, points: [[0.21328, -0.25886], [2.86361, -1.43605], [2.98539, -1.16188], [0.33506, 0.01531]], y: [0.85, 1.15]}   # an arm of the balance-wheel
      - {kind: poly, points: [[0.11754, 0.31414], [-0.18814, 3.19798], [-0.48647, 3.16636], [-0.18079, 0.28252]], y: [0.85, 1.15]}   # an arm of the balance-wheel
      - {kind: disc, center: [0, 0], radius: 0.3, y: [0.3, 1.3], color: "#8f8a80"}   # the cylinder's top plug
      - {kind: disc, center: [0, 0], radius: 1.0, inner: 0.85, y: [-1.3, -0.25], color: "#9aa3ad"}   # the cylinder below the passage (whole)
      - {kind: disc, center: [0, 0], radius: 1.0, inner: 0.85, y: [0.25, 0.8], color: "#9aa3ad"}   # the cylinder above the passage (whole), up to the balance-wheel
      - {kind: disc, center: [0, 0], radius: 0.25, y: [-2.0, -1.3], color: "#8f8a80"}   # the lower pivot plug
      - {kind: poly, points: [[-0.2469, 0.81335], [-0.29048, 0.95688], [-0.34483, 0.93867], [-0.39804, 0.91737], [-0.44995, 0.89305], [-0.48615, 0.85091], [-0.43158, 0.7554], [-0.38246, 0.75909]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell (exit lip)
      - {kind: poly, points: [[-0.35026, 0.79638], [-0.39454, 0.89707], [-0.44995, 0.89305], [-0.50038, 0.8658], [-0.54917, 0.83571], [-0.59615, 0.80287], [-0.62461, 0.75516], [-0.5545, 0.6704], [-0.50673, 0.68244], [-0.38246, 0.75909]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.48138, 0.72469], [-0.54225, 0.81631], [-0.59615, 0.80287], [-0.64117, 0.76739], [-0.68409, 0.7294], [-0.72476, 0.689], [-0.74463, 0.63712], [-0.66105, 0.56561], [-0.61605, 0.58565], [-0.50673, 0.68244]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.59831, 0.63161], [-0.67395, 0.71147], [-0.72476, 0.689], [-0.76305, 0.64634], [-0.79883, 0.60156], [-0.83198, 0.5548], [-0.84268, 0.50029], [-0.7481, 0.44413], [-0.70719, 0.47158], [-0.61605, 0.58565]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.69757, 0.5199], [-0.78577, 0.58563], [-0.83198, 0.5548], [-0.86241, 0.50622], [-0.88999, 0.45597], [-0.91466, 0.40423], [-0.91587, 0.34869], [-0.81307, 0.30955], [-0.77746, 0.34359], [-0.70719, 0.47158]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.77626, 0.39284], [-0.8744, 0.44251], [-0.91466, 0.40423], [-0.93632, 0.35116], [-0.9549, 0.29693], [-0.97034, 0.24173], [-0.96203, 0.1868], [-0.85405, 0.16583], [-0.82479, 0.20547], [-0.77746, 0.34359]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.83204, 0.2542], [-0.93724, 0.28634], [-0.97034, 0.24173], [-0.9826, 0.18573], [-0.99163, 0.12913], [-0.9974, 0.0721], [-0.97981, 0.0194], [-0.86983, 0.01723], [-0.84779, 0.06128], [-0.82479, 0.20547]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.86326, 0.10805], [-0.97241, 0.12172], [-0.9974, 0.0721], [-0.99989, 0.01483], [-0.9991, -0.04248], [-0.99502, -0.09966], [-0.96867, -0.14857], [-0.85994, -0.13189], [-0.84577, -0.08471], [-0.84779, 0.06128]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.86902, -0.04128], [-0.9789, -0.0465], [-0.99502, -0.09966], [-0.98768, -0.15651], [-0.97709, -0.21284], [-0.96329, -0.26848], [-0.92896, -0.31215], [-0.82469, -0.27712], [-0.81879, -0.22821], [-0.84577, -0.08471]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.84913, -0.1894], [-0.9565, -0.21334], [-0.96329, -0.26848], [-0.94632, -0.32323], [-0.92624, -0.37692], [-0.90313, -0.42938], [-0.86183, -0.46653], [-0.76509, -0.41417], [-0.76766, -0.36497], [-0.81879, -0.22821]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.80419, -0.33192], [-0.90587, -0.37389], [-0.90313, -0.42938], [-0.87704, -0.48042], [-0.84807, -0.52988], [-0.81632, -0.5776], [-0.76927, -0.60714], [-0.68292, -0.53899], [-0.69387, -0.49096], [-0.76766, -0.36497]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.73552, -0.46466], [-0.82852, -0.52341], [-0.81632, -0.5776], [-0.78188, -0.62343], [-0.74488, -0.6672], [-0.70542, -0.70879], [-0.65401, -0.72984], [-0.58061, -0.64792], [-0.59961, -0.60247], [-0.69387, -0.49096]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.64515, -0.58368], [-0.72672, -0.65748], [-0.70542, -0.70879], [-0.66365, -0.74804], [-0.6197, -0.78484], [-0.57371, -0.81906], [-0.51946, -0.831], [-0.46115, -0.73772], [-0.48766, -0.6962], [-0.59961, -0.60247]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.53574, -0.68548], [-0.60348, -0.77215], [-0.57371, -0.81906], [-0.52584, -0.85058], [-0.47624, -0.87931], [-0.42508, -0.90516], [-0.36958, -0.90764], [-0.3281, -0.80576], [-0.36132, -0.76938], [-0.48766, -0.6962]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.41052, -0.76705], [-0.46243, -0.86404], [-0.42508, -0.90516], [-0.37251, -0.92803], [-0.31873, -0.94785], [-0.2639, -0.96455], [-0.20879, -0.9575], [-0.18536, -0.85003], [-0.22431, -0.81987], [-0.36132, -0.76938]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.27319, -0.82599], [-0.30773, -0.93043], [-0.2639, -0.96455], [-0.2082, -0.97809], [-0.15181, -0.98841], [-0.09493, -0.99548], [-0.04185, -0.97911], [-0.03715, -0.86921], [-0.08069, -0.84616], [-0.22431, -0.81987]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[-0.1278, -0.86056], [-0.14396, -0.96937], [-0.09493, -0.99548], [-0.03773, -0.99929], [0.01958, -0.99981], [0.07684, -0.99704], [0.12634, -0.97182], [0.11216, -0.86274], [0.06531, -0.84749], [-0.08069, -0.84616]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[0.02136, -0.86974], [0.02406, -0.9797], [0.07684, -0.99704], [0.13384, -0.991], [0.1904, -0.98171], [0.24634, -0.96918], [0.29079, -0.93586], [0.25815, -0.83082], [0.20939, -0.82381], [0.06531, -0.84749]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[0.16989, -0.85325], [0.19137, -0.96113], [0.24634, -0.96918], [0.30147, -0.95348], [0.3556, -0.93464], [0.40857, -0.91273], [0.44667, -0.87229], [0.39653, -0.77438], [0.34729, -0.77582], [0.20939, -0.82381]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[0.31341, -0.81159], [0.35304, -0.9142], [0.40857, -0.91273], [0.4602, -0.88782], [0.51031, -0.85999], [0.55875, -0.82934], [0.58936, -0.78298], [0.52321, -0.69509], [0.47494, -0.70494], [0.34729, -0.77582]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[0.44768, -0.74598], [0.50429, -0.84029], [0.55875, -0.82934], [0.60535, -0.79596], [0.64996, -0.75997], [0.69244, -0.72148], [0.71466, -0.67056], [0.63445, -0.5953], [0.58857, -0.61325], [0.47494, -0.70494]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell
      - {kind: poly, points: [[0.56875, -0.65835], [0.64066, -0.74159], [0.69244, -0.72148], [0.73264, -0.68062], [0.77043, -0.63752], [0.8057, -0.59233], [0.68484, -0.50348], [0.58857, -0.61325]], y: [-0.25, 0.25], collide: 1, color: "#9aa3ad"}   # the cylinder's shell (entry lip)
joints:
  - {id: j_wheel, type: hinge, body: wheel, axis: [0, 1, 0], damping: 0.000005}   # the escape-wheel; + : clockwise (its way)
  - {id: j_bal, type: hinge, body: balance, axis: [0, 1, 0], stiffness: 0.002, springref: 2.2, damping: 4e-06}   # the balance and its spring; + : clockwise
contact: {solref: [0.001, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
# The mainspring: a constant torque on the escape-wheel, clockwise. Nothing else is driven.
driver: {joint: j_wheel, kind: torque, torque: 0.008, max_torque: 0.05}
checks:
  - {type: advance, joint: j_wheel, beat: j_bal, expect: 0.20944, tol: 0.03, settle_s: 3, window_s: 8.6}
  - {type: period, joint: j_bal, expect_s: 1.03358, tol: 0.03, settle_s: 3, window_s: 8}
  - {type: amplitude, joint: j_bal, min: 1.2, max: 2.4, sustain: 0.9, settle_s: 3, window_s: 8}
  - {type: penetration, max: 0.0005, settle_s: 1}
camera: {target: [0, 0, -7.0], position: [14.0, -30.0, 55.0], fov: 30}
display:
  output: j_wheel
  swing: j_bal
  labels: {j_wheel: "Escape-wheel (mainspring)", j_bal: "Balance and cylinder"}
  proof: {label: "Cylinder out of contact", sub: "nothing makes good the balance's losses, so its swing dies away, and the mainspring spins the wheel freely"}

