number: 355
slug: gyroscope-rotascope
name: The gyroscope or rotascope
brown: "The gyroscope or rotascope, an instrument illustrating the tendency of rotating bodies to preserve their plane of rotation. The spindle of the metallic disk, C, is fitted to turn easily in bearings in the ring, A. If the disk is set in rapid-rotary motion on its axis, and the pintle, F, at one side of the ring, A, is placed on the bearing in the top of the pillar, G, the disk and ring seem indifferent to gravity, and instead of dropping begin to revolve about the vertical axis."
units: cm
sim:
  timestep: 0.0001
  integrator: implicit
  iterations: 50
  solver: PGS
  multiccd: false
  duration_s: 8
  floor: false
bodies:
  # the cap on the pillar's top: turns about the vertical
  - id: cap
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [0, 0, -1.6], to: [0, 0, -0.5], radius: 0.7}
      - {kind: rod, from: [-0.9, 0, -0.5], to: [0.9, 0, -0.5], radius: 0.3}
  # the ring A with its pintle F, tilting on the cap
  - id: ring
    shape: part
    pos: [0, 0, 0]
    mount: cap
    density: 7800
    color: "#b08d57"
    pieces:
      - {kind: rod, from: [0.0, 1.0, 0], to: [1.2681, 1.1249, 0], radius: 0.35}
      - {kind: rod, from: [1.2681, 1.1249, 0], to: [2.4874, 1.4948, 0], radius: 0.35}
      - {kind: rod, from: [2.4874, 1.4948, 0], to: [3.6112, 2.0954, 0], radius: 0.35}
      - {kind: rod, from: [3.6112, 2.0954, 0], to: [4.5962, 2.9038, 0], radius: 0.35}
      - {kind: rod, from: [4.5962, 2.9038, 0], to: [5.4046, 3.8888, 0], radius: 0.35}
      - {kind: rod, from: [5.4046, 3.8888, 0], to: [6.0052, 5.0126, 0], radius: 0.35}
      - {kind: rod, from: [6.0052, 5.0126, 0], to: [6.3751, 6.2319, 0], radius: 0.35}
      - {kind: rod, from: [6.3751, 6.2319, 0], to: [6.5, 7.5, 0], radius: 0.35}
      - {kind: rod, from: [6.5, 7.5, 0], to: [6.3751, 8.7681, 0], radius: 0.35}
      - {kind: rod, from: [6.3751, 8.7681, 0], to: [6.0052, 9.9874, 0], radius: 0.35}
      - {kind: rod, from: [6.0052, 9.9874, 0], to: [5.4046, 11.1112, 0], radius: 0.35}
      - {kind: rod, from: [5.4046, 11.1112, 0], to: [4.5962, 12.0962, 0], radius: 0.35}
      - {kind: rod, from: [4.5962, 12.0962, 0], to: [3.6112, 12.9046, 0], radius: 0.35}
      - {kind: rod, from: [3.6112, 12.9046, 0], to: [2.4874, 13.5052, 0], radius: 0.35}
      - {kind: rod, from: [2.4874, 13.5052, 0], to: [1.2681, 13.8751, 0], radius: 0.35}
      - {kind: rod, from: [1.2681, 13.8751, 0], to: [0.0, 14.0, 0], radius: 0.35}
      - {kind: rod, from: [0.0, 14.0, 0], to: [-1.2681, 13.8751, 0], radius: 0.35}
      - {kind: rod, from: [-1.2681, 13.8751, 0], to: [-2.4874, 13.5052, 0], radius: 0.35}
      - {kind: rod, from: [-2.4874, 13.5052, 0], to: [-3.6112, 12.9046, 0], radius: 0.35}
      - {kind: rod, from: [-3.6112, 12.9046, 0], to: [-4.5962, 12.0962, 0], radius: 0.35}
      - {kind: rod, from: [-4.5962, 12.0962, 0], to: [-5.4046, 11.1112, 0], radius: 0.35}
      - {kind: rod, from: [-5.4046, 11.1112, 0], to: [-6.0052, 9.9874, 0], radius: 0.35}
      - {kind: rod, from: [-6.0052, 9.9874, 0], to: [-6.3751, 8.7681, 0], radius: 0.35}
      - {kind: rod, from: [-6.3751, 8.7681, 0], to: [-6.5, 7.5, 0], radius: 0.35}
      - {kind: rod, from: [-6.5, 7.5, 0], to: [-6.3751, 6.2319, 0], radius: 0.35}
      - {kind: rod, from: [-6.3751, 6.2319, 0], to: [-6.0052, 5.0126, 0], radius: 0.35}
      - {kind: rod, from: [-6.0052, 5.0126, 0], to: [-5.4046, 3.8888, 0], radius: 0.35}
      - {kind: rod, from: [-5.4046, 3.8888, 0], to: [-4.5962, 2.9038, 0], radius: 0.35}
      - {kind: rod, from: [-4.5962, 2.9038, 0], to: [-3.6112, 2.0954, 0], radius: 0.35}
      - {kind: rod, from: [-3.6112, 2.0954, 0], to: [-2.4874, 1.4948, 0], radius: 0.35}
      - {kind: rod, from: [-2.4874, 1.4948, 0], to: [-1.2681, 1.1249, 0], radius: 0.35}
      - {kind: rod, from: [-1.2681, 1.1249, 0], to: [-0.0, 1.0, 0], radius: 0.35}
      - {kind: rod, from: [0, -0.4, 0], to: [0, 1.0, 0], radius: 0.45}
      - {kind: rod, from: [-0.8, 0, 0], to: [0.8, 0, 0], radius: 0.25, color: "#6f6a60"}
  # the disk C on its spindle, in bearings in the ring
  - id: disk
    shape: part
    pos: [0, 7.5, 0]
    mount: ring
    density: 7800
    color: "#d8c9a3"
    pieces:
      - {kind: disc, center: [0, 0], radius: 5.0, y: [6.25, 8.75]}
      - {kind: rod, from: [0, 1.3, 0], to: [0, 13.7, 0], radius: 0.3, color: "#6f6a60"}
      - {kind: rod, from: [0.9553, 6.2, 0.2955], to: [4.3945, 6.2, 1.3594], radius: 0.18, color: "#5a4a36"}
      - {kind: rod, from: [-0.7336, 6.2, 0.6796], to: [-3.3745, 6.2, 3.1261], radius: 0.18, color: "#5a4a36"}
      - {kind: rod, from: [-0.2217, 6.2, -0.9751], to: [-1.02, 6.2, -4.4855], radius: 0.18, color: "#5a4a36"}
  - id: pillar
    shape: frame
    color: "#8f8a80"
    rods:
      - {from: [0, 0, -16], to: [0, 0, -1.6], radius: 0.9}
  - id: base
    shape: part
    pos: [0, 0, -16.8]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-6, -17.6], [6, -17.6], [6, -16], [-6, -16]], y: [-6, 6]}
joints:
  - {id: j_v, type: hinge, body: cap, axis: [0, 0, 1]}            # positive: against the clock seen from above
  - {id: j_t, type: hinge, body: ring, axis: [1, 0, 0], range: [-0.6, 0.6]}   # positive: the disk's end up
  - {id: j_s, type: hinge, body: disk, axis: [0, 1, 0]}
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_s, kind: velocity, rpm: 4000.0, kv: 1, max_torque: 20}
checks:
  - {type: ratio, out: j_v, in: j_s, expect: 0.00368, tol: 0.0001, settle_s: 1.0, window_s: 6.5}
  - {type: position, joint: j_t, min: -0.12, max: 0.05, settle_s: 0.2, window_s: 7.5}
camera: {target: [0, 4, -12], position: [-55, -105, 12], fov: 30}
display:
  output: j_v
  labels: {j_s: "Disk C (spun)", j_v: "Ring A about the pillar", j_t: "Tilt of the ring"}

