CITE THIS NOTEBOOK: Constant angle between the hour and minute hands on an analog clock by Oliver Seipel. Wolfram Community JAN 6 2023.
What then is time? If no one asks me, I know what it is. If I wish to explain it to him who asks, I do not know.
Saint Augustine AD 397.
​https://en.wikipedia.org/wiki/Confessions_(Augustine)
I also don’t know what time is. But it is measured with a clock.
You may have wondered when the hour and minute hands have the same constant angle, and how often that happens within 12 hours? Until recently, I wasn’t even aware of this problem. But now I constantly look at analog clocks with this thought in mind.
Although there is a ClockGauge, here is another implementation AnalogClock (the code is somewhat clumsy) in the spirit of the swiss rail clock:
In[]:=
AnalogClock[{h_,min_},col1_:Red,col2_:Blue,col3_:Black,col4_:White]:=Withφ=N2π
h+
min
60
12
,α=N2π
min
60
,γ=N[2πMod[min,1]],sec=Round[3600h+60min,1(*0.1*)],minorminutes=Table[Rotate[Rectangle[{-0.012,0.92},{0.012,1}],β,{0,0}],{β,2π/60,4×2π/60,2π/60}],(Graphics[{EdgeForm[col4],col1,Disk[{0,0},1.12],col4,Disk[{0,0},1.04],col3,EdgeForm[],Map[Rotate[minorminutes,#Degree,{0,0}]&,Range[0,330,30]],Map[Rotate[Rectangle[{-0.03,0.78},{0.03,1}],#Degree,{0,0}]&,Range[0,330,30]],EdgeForm[col3],col1,Rotate[Rectangle[{-0.05,-0.2},{0.05,0.7}],-φ,{0,0}],Rotate[Rectangle[{-0.03,-0.2},{0.03,0.9}],-α,{0,0}],EdgeForm[],col2,Rotate[Rectangle[{-0.02,-0.3},{0.02,0.65}],-γ,{0,0}],Rotate[Annulus[{0,0.75},{0.07,0.1}],-γ,{0,0}],EdgeForm[col2],Disk[{0,0},0.03]},PlotLabel->Style[Row[{Quotient[sec,3600],":",Row[IntegerDigits[Mod[Floor[sec/60],60],10,2]],":",Row[{If[Mod[sec,60]<10,"0",""],Mod[sec,60]}]}],Black],ImageSize->100])
And this is what it looks like:
In[]:=
AnalogClock[{10,7+38/60},Black,Red,Black,White]
Out[]=
In[]:=
AnalogClock[{10,7+38/60},White,Red,White,Black]
Out[]=
In[]:=
ShowClocks[degree_]:=GridPartitionTableAnalogClockh,
h60+2degree
11
,If[h==11,White,Black],Red,If[h==11,White,Black],If[h==11,Black,White],{h,0,11},UpTo[4]
Minute and hour hands are in the same direction:
In[]:=
ShowClocks[0]
Out[]=
Minute and hour hands have 30° angle:
In[]:=
ShowClocks[30]
Out[]=
Minute and hour hands have 90° angle:
In[]:=
ShowClocks[90]
Out[]=
Minute and hour hands are in the opposite directions:
In[]:=
ShowClocks[180]
Out[]=