[Tex/LaTex] How to draw the figure inscribed in a circle

tikz-pgf

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$.

enter image description here

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 (1,1) circle [radius=3.16];

\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}

Best Answer

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.

enter image description here

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.