Ford Circle

Author

Eric W. Weisstein
February 1, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneGeometry/FordCircle.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FordCircle.html.

©2010 Wolfram Research, Inc. except for portions noted otherwise

Code

Farey[n_]:=Join[{0},Union[Table[i/j,{j,n},{i,j-1}]//Flatten],{1}]
Farey[n_,k_]:=Farey[n][[k]]

FordCircle[h_Integer,k_Integer]:=Circle[{h/k,1/(2k^2)},1/(2k^2)]
FordCircles[h_Integer,k_Integer]:={Circle[{h/k,1/(2k^2)},1/(2k^2)],Circle[{h/k,-1/(2k^2)},1/(2k^2)]}

FordThree[n_,k_]:=Module[{j},
Table[FordCircle@@{Numerator[Farey[n,j]],Denominator[Farey[n,j]]},
{j,k,k+2}]
]

FordThreePoints[n_,kk_]:=Module[{j,h,k,f},
f=Table[Farey[n,j],{j,kk,kk+2}];
{h,k}={Numerator[f],Denominator[f]};
Point/@{
{h[[2]]/k[[2]]-k[[1]]/k[[2]]/(k[[2]]^2+k[[1]]^2),1/(k[[2]]^2+k[[1]]^2)},
{h[[2]]/k[[2]]+k[[3]]/k[[2]]/(k[[2]]^2+k[[3]]^2),1/(k[[2]]^2+k[[3]]^2)}
}
]

FordThreePointsSemicircle[n_,kk_]:=Module[{j,h,k,f,r,c},
f=Table[Farey[n,j],{j,kk,kk+1}];
{h,k}=Through[{Numerator,Denominator}[f]];
c={(h[[1]]/k[[1]]+h[[2]]/k[[2]])/2,0};
r=(h[[2]]/k[[2]]-h[[1]]/k[[1]])/2;
{Dashing[{.02,.02}],Circle[c,r,{0,Pi}]}
]

Farey Sequence

V5

Farey[5]

Figure

Show[Graphics[Table[FordCircles[h,k],{h,10},{k,10}]],AspectRatio->Automatic,PlotRange->{{0,2},{-1,1}}]

Show[Graphics[{
FordThree[6,4],
PointSize[.03],FordThreePoints[6,4],
FordThreePointsSemicircle[6,4],
FordThreePointsSemicircle[6,5],
Line[{{.2,0},{.45,0}}]
}],AspectRatio->Automatic]

Farey[5]

With[{h2=1,k2=4,h3=1,k3=3},
Show[Graphics[
{
FordCircle[h2,k2],
FordCircle[h3,k3],
PointSize[.04],Point[{(h2/k2)+(k3/(k2((k2^2)+(k3^2)))),(1/((k2^2)+(k3^2)))}]
}],AspectRatio->Automatic]
]

V6

Graphics[Table[FordCircles[h,k],{h,10},{k,10}],PlotRange->{{0,2},{-1.01,1.01}}]