# How to draw the figure inscribed in a circle?

In a Geometry problem appears the figure inscribed in a circle, having outline consisting of $8$ ~semicircles, see figure on the left. The radius of each semicircle is $1$.

By doing some calculations, it's easy to realize that the radius of the circle is $\sqrt{10}$

For the solution of the problem, it is interesting to observe the figure on the right.

\begin{center}

\begin{tikzpicture}

\draw (0.5,0) arc(0:-180:1);

\draw (1.5,0) arc(0:180:1);

\draw (0,1.5) arc(-90:-270:1);

\end{tikzpicture}

\end{center}

• John Kormylo, the radius is $\sqrt{10}$. Feb 29, 2020 at 14:44
• Assuming the tangent occurs at 60 degrees, (2+\sqrt(3)/2)^2+1.5^2 is not 10. A test draw seems to fit this. Feb 29, 2020 at 15:11
• I'm sorry, but I can form a right triangle, inscribed in the circle, whose catetos measure 2 and 6 respectively. Hypotenuse is the diameter of the circle. Feb 29, 2020 at 15:18

And a version in Metapost, relying on the fact that the tangent point on the small circle must be the same point on the circumcircle, and using some nice colours.

prologues := 3;
outputtemplate := "%j%c.eps";

input colorbrewer-cmyk

beginfig(1);

path base, edge, propeller, circumcircle, square;

base = halfcircle shifted 1/2 right;
edge = (base & reverse base rotated 180) shifted up scaled 89;
propeller = for i=0 upto 3: edge rotated 90i .. endfor cycle;
circumcircle = fullcircle scaled 2 abs(point 1/45 angle
1/2[point 0 of edge, point 4 of edge] of edge);
square = for i=0 upto 3: point 9i of propeller -- endfor cycle;

picture P[];
P1 = image(
fill circumcircle withcolor Blues 8 5;
fill propeller withcolor Blues 8 4;
draw propeller;
);
P2 = image(
fill square withcolor Blues 8 5;
fill propeller withcolor Blues 8 4;
clip currentpicture to square;
);
P3 = image(
fill propeller withcolor Blues 8 2;
draw P2;
draw propeller;
);
draw P1;
draw P3 shifted 300 right;

endfig;
end.


• John Kormylo - I recognize I made a mistake. In fact, the radius can't be $sqrt{10}$. It was really nice to see you! Mar 1, 2020 at 10:59
• Very kind John...I have removed my question on the rocket. Always thank you. Oct 17, 2020 at 8:12

You don't need to know the radius of the big circle

\documentclass{standalone}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{tkz-euclide}

\begin{document}

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/0/B,2/2/O,3/4/X,4/1/Y,1/0/Z,
0/3/W,3/0/R,4/3/S,1/4/T,0/1/U}
\tkzDefSquare(A,B)\tkzGetPoints{C}{D}
\tkzInterLC(O,X)(X,C) \tkzGetSecondPoint{F}
% or \tkzDefPointWith[colinear normed=at X,K=1](O,X) \tkzGetPoint{F}
\begin{scope}
\tkzFillCircle[fill=MidnightBlue](O,F)
\tkzFillPolygon[purple!40](A,...,D)
\tkzClipPolygon(A,...,D)
\foreach \c/\t in {S/C,R/B,U/A,T/D}
{\tkzFillCircle[MidnightBlue](\c,\t)}
\end{scope}
\foreach \c/\t in {X/C,Y/B,Z/A,W/D}
{\tkzFillCircle[purple!40](\c,\t)}
\foreach \c/\t in {S/C,R/B,U/A,T/D}
{\tkzFillCircle[MidnightBlue](\c,\t)}
\end{tikzpicture}
\end{document}


With the radius r=1+sqrt(5) (easy to get!).

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\def\cc{(2,0) arc(270:90:1) arc(0:180:1) arc(0:-180:1) arc(90:270:1) arc(90:-90:1) arc(180:360:1) arc(180:0:1) arc(-90:90:1)--cycle;}
\begin{tikzpicture}
\pgfmathsetmacro{\r}{1+sqrt(5)}
\fill[teal] (0,0) circle(\r);
\draw[fill=white] \cc;
\end{tikzpicture}
\hspace*{1cm}
\begin{tikzpicture}
\fill[green!50] (-2,-2) rectangle (2,2);
\begin{scope}
\clip (-2,-2) rectangle (2,2);
\fill[purple!50] \cc;
\end{scope}
\draw \cc;
\end{tikzpicture}
\end{document}


Update. Now I realise that using fit library is not suitable for this situation. In fact, smallest-circle problem is more complicated than direct calculating the above radius.

Another way without calculation is using library through after finding out the tangent point as follows.

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{through}
\begin{document}
\begin{tikzpicture}
\path (0,0)--(1,2)--([turn]0:1) coordinate (M);
\node[circle through=(M),draw,fill=cyan] at (0,0) {};
\draw[fill=white] (2,0) arc(270:90:1) arc(0:180:1) arc(0:-180:1) arc(90:270:1) arc(90:-90:1) arc(180:360:1) arc(180:0:1) arc(-90:90:1)--cycle;
\end{tikzpicture}
\end{document}


Is it reasonable that the library through is just for circle through?!

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\path (0,0)--(1,2)--([turn]0:1) coordinate (M);
\draw[fill=violet!50] (0,0)
let \p1=(M) in circle({veclen(\x1,\y1)});
\draw[fill=white] (2,0) arc(270:90:1) arc(0:180:1) arc(0:-180:1) arc(90:270:1) arc(90:-90:1) arc(180:360:1) arc(180:0:1) arc(-90:90:1)--cycle;
\end{tikzpicture}
\end{document}

• You seem not to use fit, do you?
– user194703
Feb 29, 2020 at 16:26
• @Schrödinger'scat ah, yes! something like this \usetikzlibrary{fit} \begin{tikzpicture}[draw,circle,inner sep=0,outer sep=0] \path[nodes={minimum size=2cm}] (1,2) node (A) {} (-2,1) node (B) {} (-1,-2) node (C) {} (2,-1) node (D) {}; \node[fill=teal,fit=(A) (B) (C) (D)] {}; \draw[fill=white] \cc; \end{tikzpicture}  I will update later! Feb 29, 2020 at 16:46
• I added some comment. fit library is not suitable here! Feb 29, 2020 at 20:28
• I added another way using through library, and without calculation. Mar 1, 2020 at 17:14
• @BlackMild Good idea.I don't have turn with tkz-euclide but possible with the same idea \tkzDefPointWith[colinear normed=at X,K=1](O,X) \tkzGetPoint{F} Mar 1, 2020 at 19:44

I think The radius of big circle is \sqrt{5}+1. Here XY=4(two small circle diameter= 2*(1+1)) YZ=2. so XZ=\sqrt{4^2+2^2}=\sqrt{20}, so radius of big circle would be (\sqrt{20}+2)/2=\sqrt{5}+1. I used @Schrödinger's cat code but used radius=\sqrt{5}+1. and here is the figure.

I agree with John Kormylo, i.e. I also do not get a radius of sqrt(10), but maybe I do not understand the construction. The sqrt(5)+1 is from this answer.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[arcs/.style={insert path={foreach \X [count=\Y] in {180,90,0,-90}
\begin{scope}[local bounding box=arcs]
\draw[fill=blue!60,even odd rule] (0,0) [arcs]
\end{scope}
\begin{scope}[local bounding box=arcs2,xshift=7.5cm]
\draw (0,0) [arcs=p] (p1) rectangle (p3);
\clip[postaction={fill=purple}](p1) rectangle (p3);
\draw[fill=green!50,even odd rule] (0,0)
[arcs=p] (p1) rectangle (p3);
\end{scope}
\end{tikzpicture}
\end{document}

• You beat me by seconds. Feb 29, 2020 at 15:24
• @JohnKormylo Sorry to hear that!
– user194703
Feb 29, 2020 at 15:25
• Thank you. But I keep thinking that the measure of the radius of the circle is $sqrt{10}$. I can't put here the figure that makes clear the value of the radius Feb 29, 2020 at 15:39
• @BeneditoFreire All I know is that if I uses sqrt(10) above the circle is too small. I think John Kormylo is right.
– user194703
Feb 29, 2020 at 15:42