我有六条弧:
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[scale=0.3]
\tkzDefPoint(0,0){a}
\tkzDefPoint(12,0){b}
\tkzDefPoint(4,10){c}
\tkzInterCC[R](a,6cm)(b,8cm) \tkzGetFirstPoint{AB1} \tkzGetSecondPoint{AB2}
\tkzInterCC[R](a,6cm)(c,6cm) \tkzGetFirstPoint{AC1} \tkzGetSecondPoint{AC2}
\tkzInterCC[R](b,8cm)(c,6cm) \tkzGetFirstPoint{BC1} \tkzGetSecondPoint{BC2}
\tkzDrawArc(a,AB2)(AB1)
\tkzDrawArc(b,AB1)(AB2)
\tkzDrawArc(a,AC2)(AC1)
\tkzDrawArc(c,AC1)(AC2)
\tkzDrawArc(b,BC2)(BC1)
\tkzDrawArc(c,BC1)(BC2)
\end{tikzpicture}
\end{figure}
\end{document}
我想填充这三个圆弧所形成的三个透镜。
如果我使用\tkzFillSector
,它将完全填充圆的扇区:
我想要的是这个:
填充这个镜头内部最简单的方法是什么?
答案1
这似乎需要付出很多努力才能达到这个效果。你只需要普通的 Ti钾Z 就是那个。
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\coordinate (a) at (0,0);
\coordinate (b) at (12,0);
\coordinate (c) at (4,10);
\begin{scope}
\clip (a) circle (6cm);
\fill[blue!40!white] (b) circle (8cm);
\end{scope}
\begin{scope}
\clip (c) circle (6cm);
\fill[blue!40!white] (b) circle (8cm);
\end{scope}
\begin{scope}
\clip (c) circle (6cm);
\fill[blue!40!white] (a) circle (6cm);
\end{scope}
\end{tikzpicture}
\end{document}
这是一种计算交点的可能方法。
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\coordinate (a) at (0,0);
\coordinate (b) at (12,0);
\coordinate (c) at (4,10);
\begin{scope}
\clip[name path global=CircleA] (a) circle (6cm);
\fill[name path global=CircleB,blue!40!white] (b) circle (8cm);
\end{scope}
\begin{scope}
\clip[name path global=CircleC] (c) circle (6cm);
\fill[blue!40!white] (b) circle (8cm);
\end{scope}
\begin{scope}
\clip (c) circle (6cm);
\fill[blue!40!white] (a) circle (6cm);
\end{scope}
\path[name intersections={of=CircleA and CircleB, name=AB}];
\fill (AB-1) circle (1pt);\fill (AB-2) circle (1pt);
\path[name intersections={of=CircleA and CircleC, name=AC}];
\fill (AC-1) circle (1pt);\fill (AC-2) circle (1pt);
\path[name intersections={of=CircleB and CircleC, name=BC}];
\fill (BC-1) circle (1pt);\fill (BC-2) circle (1pt);
\end{tikzpicture}
\end{document}
答案2
您可以使用相同的代码tkz-euclide
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{figure}\[htbp\]
\centering
\begin{tikzpicture}\[scale=0.3\]
\tkzDefPoint(0,0){a}
\tkzDefPoint(12,0){b}
\tkzDefPoint(4,10){c}
\tkzInterCC\[R\](a,6cm)(b,8cm) \tkzGetFirstPoint{AB1} \tkzGetSecondPoint{AB2}
\tkzInterCC\[R\](a,6cm)(c,6cm) \tkzGetFirstPoint{AC1} \tkzGetSecondPoint{AC2}
\tkzInterCC\[R\](b,8cm)(c,6cm) \tkzGetFirstPoint{BC1} \tkzGetSecondPoint{BC2}
\tkzDrawArc(a,AB2)(AB1)
\tkzDrawArc(b,AB1)(AB2)
\tkzDrawArc(a,AC2)(AC1)
\tkzDrawArc(c,AC1)(AC2)
\tkzDrawArc(b,BC2)(BC1)
\tkzDrawArc(c,BC1)(BC2)
\begin{scope}
\tkzClipSector(b,BC2)(BC1)
\tkzFillSector\[blue!40!white\](c,BC1)(BC2)
\end{scope}
\begin{scope}
\tkzClipSector(a,AB2)(AB1)
\tkzFillSector\[blue!40!white\](b,AB1)(AB2)
\end{scope}
\begin{scope}
\tkzClipSector(a,AC2)(AC1)
\tkzFillSector\[blue!40!white\](c,AC1)(AC2)
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}