4

I would like to draw this figure, where two circles are tangents to a semicircle, as in the following figure:

Two circles tangents to a semicircle

I can partially draw:

\documentclass[12pt]{article}

\usepackage{tikz}   

\begin{document}

\begin{center}

\begin{tikzpicture}[scale=0.3]

\draw [ultra thick] (0,0) arc (0:180:6);

\draw [ultra thick] (-12,0)--(0,0);

\node at (-6,0) {$\bullet$};

\node at (-12,0) {$\bullet$};

\node at (0,0) {$\bullet$};

\end{tikzpicture}

\end{center}

\end{document}

Semicircle without the two tangents circles

13
\documentclass[12pt]{article}
\usepackage{tikz}   
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=0.3,declare
function={R=6;a=1;},bullet/.style={circle,fill,inner sep=1.5pt}]
\draw [ultra thick] (R,0) arc (0:180:R) -- cycle;
\pgfmathsetmacro{\myalpha}{asin(a/(R-a))}
\draw[blue] ({(a-R)*cos(\myalpha)},a) node[bullet] (L){} circle[radius=a]
({(R-a)*cos(\myalpha)},a) node[bullet] (R){}  circle[radius=a];
\draw[dashed] (L) -- (R);
\path (-R,0) node[bullet]{} (-R,0) node[bullet]{} (0,0) node[bullet]{}
 (180-\myalpha:R) node[bullet]{} (\myalpha:R) node[bullet]{}; 
\end{tikzpicture}
\end{center}
\end{document}

enter image description here

Here is a possible derivation.

\documentclass[12pt,fleqn]{article}
\usepackage{tikz}   
\begin{document}
Call the large radius $R$ and the small radius $a$. The condition that the
circles ``touch'' means that the slopes of the circles at the touching point
coincide. This implies that the circles touch at points with coinciding polar
angle $\alpha$ (see figure~\ref{fig:Computation}). Therefore,
\[ a+a\,\sin\alpha~=~R\,\sin\alpha\]
and thus
\[ \alpha~=~\arcsin\frac{a}{R-a}\;.\]
This means that the centers of the circles are at
$(\pm(R-a)\cos\alpha,a)=(\pm\sqrt{R\,(R-2 a)},a)$.

\begin{figure}[!h]
\centering
\begin{tikzpicture}[scale=0.8,declare function={R=6;a=1;}]

\draw [ultra thick] (R,0) arc (0:180:R) -- cycle;
\node at (-R,0) {$\bullet$};
\node at (R,0) {$\bullet$};
\node at (0,0) {$\bullet$};
\pgfmathsetmacro{\myalpha}{asin(a/(R-a))}
\draw[red] (0,0) -- (180-\myalpha:R)
 (-2,0) arc(180:180-\myalpha:2) node[midway,left]{$\alpha$};
\draw[red] ({(a-R)*cos(\myalpha)-2},a) -- ({(a-R)*cos(\myalpha)},a) 
-- ++ (180-\myalpha:2) 
({(a-R)*cos(\myalpha)-2},a) arc(180:180-\myalpha:2) node[midway,left]{$\alpha$};
\draw ({(a-R)*cos(\myalpha)},a) -- ({(a-R)*cos(\myalpha)},0)
node[midway,fill=white]{$a$};
\draw (0,0) -- (40:R) node[midway,fill=white]{$R$};
\draw[blue] ({(a-R)*cos(\myalpha)},a) circle[radius=a]
({(R-a)*cos(\myalpha)},a) circle[radius=a];
\end{tikzpicture}
\caption{Computation of the center of the circle.}
\label{fig:Computation}
\end{figure}
\end{document}

enter image description here

Of course, you can vary a.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\foreach \X in {1,1.1,...,3,2.9,2.8,...,1.1}
{\begin{tikzpicture}[declare function={R=6;a=\X;},bullet/.style={circle,fill,inner sep=1.5pt}]
 \path[use as bounding box] (-R-0.2,-0.2) rectangle (R+0.2,R+0.2);
 \draw [ultra thick] (R,0) arc (0:180:R) -- cycle;
 \pgfmathsetmacro{\myalpha}{asin(a/(R-a))}
 \draw[blue] ({(a-R)*cos(\myalpha)},a) node[bullet] (L){} circle[radius=a]
 ({(R-a)*cos(\myalpha)},a) node[bullet] (R){}  circle[radius=a];
 \draw[dashed] (L) -- (R);
 \path (-R,0) node[bullet]{} (-R,0) node[bullet]{} (0,0) node[bullet]{}
  (180-\myalpha:R) node[bullet]{} (\myalpha:R) node[bullet]{}; 
\end{tikzpicture}}
\end{document}

enter image description here

  • Schrodingesr's cat -I liked the design, but, excuse me, in the drawing it is unclear how to identify the center of each small circle. In fact, I would like the drawing to illustrate the segment by uniting these centers. – Benedito Freire Sep 19 at 21:57
  • @BeneditoFreire I added the derivation. – Schrödinger's cat Sep 19 at 22:01
  • Schrödinger's cat - Show!!!! – Benedito Freire Sep 19 at 22:44
  • Schrödinger's cat - It looks really good. Show!!!! – Benedito Freire Sep 19 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.