三个全等圆相互相交,界定两个阴影区域

三个全等圆相互相交,界定两个阴影区域

三个半径相同的圆相交,使得一个圆的中心位于其他圆的圆周上,如图所示。我想用 tikz 绘制这种阴影。

答案1

\documentclass[border=5pt]{standalone}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
   \coordinate (Y) at (0,0);
   \coordinate (X) at (210:2.5cm);
   \coordinate (Z) at (-30:2.5cm);
   \fill[gray]  (X) circle (2.5cm);
   \fill[white] (Y) circle (2.5cm);
   \begin{scope}
      \clip  (Z) circle (2.5cm);
      \fill[gray]  (X) circle (2.5cm);
   \end{scope}

   \foreach \pt in {X,Y,Z} {
     \draw (\pt) circle (2.5cm);
     \fill[black]  (\pt) circle (2pt);
   }
\end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

仅供参考:

\documentclass[tikz,border=5]{standalone}
\tikzset{random fill/.code={%
\pgfmathsetmacro\r{rnd}\pgfmathsetmacro\g{rnd}\pgfmathsetmacro\b{rnd}%
\definecolor{.}{rgb}{\r,\g,\b}%
\tikzset{fill=.}}}
\begin{document}
\begin{tikzpicture}[every path/.style={random fill}]
\path (0:0)   arc (150:90:1)  arc (30:150:1)  arc (90:30:1) -- cycle;
\path (0:0)   arc (30:-30:1)  arc (210:150:1) -- cycle;
\path (150:1) arc (90:330:1)  arc (270:150:1) -- cycle;
\path (30:1)  arc (90:-150:1) arc (270:390:1) -- cycle;
\path (0:0)   arc (30:90:1)   arc (150:270:1) arc (210:150:1) -- cycle;
\path (0:0)   arc (150:90:1)  arc (30:-90:1)  arc (-30:30:1)  -- cycle;
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案3

只是tkz-euclide为了展示多样性:

\documentclass[border=5pt]{standalone}

\usepackage{tkz-euclide}
\usetikzlibrary{backgrounds}
\usetkzobj{all}

\begin{document}
  \begin{tikzpicture}[background rectangle/.style={fill=pink!40},
                        show background rectangle,rotate=-10]
     \tkzDefPoint(0,0){Y}
     \tkzDefPoint(210:2){X}
     \tkzDefPoint(-30:2){Z}
     \tkzFillCircle[color=gray!40](X,Y)
     \tkzFillCircle[color=white](Y,X)
     \begin{scope}
       \tkzClipCircle(Z,Y)
       \tkzFillCircle[color=gray!50,%
          opacity=.5](X,Y)
     \end{scope}
     \tkzDrawCircle(X,Y)
     \tkzDrawCircle(Y,X)
     \tkzDrawCircle(Z,Y)
     \tkzDrawPoints[color=blue,fill=blue](X,Y,Z)
     \tkzLabelPoints[right](X,Y,Z)

  \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容