我已取得以下成果:
使用以下代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (8,0);
\coordinate (C) at ($(A)!.5!(B)$);
\coordinate (D) at ($(A)!.5!(C)$);
\coordinate (E) at ($(B)!.5!(C)$);
\draw[dashed] (A) -- (B);
\begin{scope}
\clip (A) rectangle (8,-8);
\draw (D) let \p1 = ($(C) - (D)$) in circle ({veclen(\x1,\y1)});
\end{scope}
\begin{scope}
\clip (A) rectangle (8,8);
\draw (C) let \p1 = ($(B) - (C)$) in circle ({veclen(\x1,\y1)});
\end{scope}
\begin{scope}
\clip (A) rectangle (8,8);
\draw (E) let \p1 = ($(B) - (E)$) in circle ({veclen(\x1,\y1)});
\end{scope}
\end{tikzpicture}
\end{document}
现在我要像这样填充区域:
答案1
像这样?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,patterns}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (8,0);
\draw[pattern=north east lines] let \p1 = ($(B) - (A)$) in (A) arc(180:360:{veclen(\x1,\y1)/4})
arc(180:0:{veclen(\x1,\y1)/4}) arc(0:180:{veclen(\x1,\y1)/2});
\draw[dashed] (A) -- (B);
\end{tikzpicture}
\end{document}
或者
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (8,0);
\draw[pattern=north east lines] (A)
arc(180:360:2) arc(180:0:2) arc(0:180:4);
\draw[dashed] (A) -- (B);
\end{tikzpicture}
\end{document}