PWWs-01-08

The Rolling Circle Squares Itself

PWWs-01-08
\documentclass[tikz, border=2pt]{standalone}
\usetikzlibrary{calc}
\usetikzlibrary{math}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[line width=3pt]
  \tikzmath{
    \r = 3;
    \R = (pi * \r + \r)/2;
    \l = sqrt(pi) * \r;
  }
  \coordinate (O1) at (0, 0);
  \coordinate (O2) at ($(O1)+(pi*\r, 0)$);
  \filldraw[fill=lightgray, draw=black] (O1) circle [radius=\r];
  \filldraw (O1) ++(0, \r) circle [radius=2pt];
  \draw[loosely dashed] (O1) -- +(0, \r);
  \draw[loosely dashed] (O1) -- +(-\r, 0);
  \draw[-{Latex[length=5mm]}] (O1) ++(60:1.2*\r) arc [start angle=60, end angle=30, radius=1.2*\r];
  \draw (O2) circle [radius=\r];
  \filldraw (O2) ++(0, -\r) circle [radius=2pt];
  \draw[loosely dashed] (O2) -- ++(\r, 0) -- ++(0, -\r);
  \draw[loosely dashed] (O2) -- +(0, -\r);
  \draw[dotted, line width=1pt] ($(O1)+(-\r, -\r)$) -- ($(O2)+(2*\r, -\r)$);
  \filldraw[fill=lightgray, draw=black] (O2) ++(0, -\r) rectangle ++(\l, -\l);
  \draw[line width=2pt] (O1) ++(0, -\r) arc [start angle=-180, end angle=0, radius=\R];
\end{tikzpicture}

\end{document}

Comments

Comments powered by Disqus