How to draw the figure inscribed in a circle?
Not an answer, but should settle the issue of the radius.
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 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}