Skip to content

drbitboy/quora_min_hour_30deg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Programmatic solution to question from Quora.com about minute and hour hands on a clock.

The original question is:

How many times are the minute hand and hour hands are [sic] at 30 degrees in a day?

The Python script, min_hour_30deg.py, confirms that the answer is 44.

It uses the SpiceyPy package to simulate a clock using three synthetic bodies: a central body; two bodies orbiting the central body. The central body represents the clock; the two bodies represent the minute and hour hands. The trajectories of the minute and hour bodies are circular orbits around the clock body such that

  • the minute body completes each orbit of the clock once per minute,
  • the hour body completes each orbit of the clock once per hour,
  • the minute and hour bodies are at a Right Ascension of zero degrees at 2001-JAN-01-00:00:00 TDB (TDB => Barycentric Dynamical Time).
  • Cf. Wiki pages Orbital period and Orbital speed.

Manifest

min_hour_30deg.py

  • Script to verify there are 44 occurences per day of times when hour and minute hand are 30degrees apart.
  • Usage: python min_hour_30deg.py [--debug]
  • This script uses the SpiceyPy package to model the MINUTE and HOUR hands as bodies orbiting a CLOCK body; the angle between the minute and hour hands are modeled as the phase angle with the CLOCK as the target body, the MINUTE body as the illuminating body, and the HOUR body as the observing body; the phase angle is the angle between the [CLOCK=>MINUTE] and [CLOCK=>HOUR] vectors.

test_output.txt

  • Output of script, with debugging turned on

min_hour_clock.bsp

  • NAIF/JPL SPICE SP-Kernel containing synthetic trajectories of MINUTE and HOUR bodies that orbit CLOCK body
  • Script will recreate this file in the current working directory if it does not exist

README.md

  • This file