是否可以用纯色填充(A 联合 B 联合 C)的补集,但其余区域保持透明?

是否可以用纯色填充(A 联合 B 联合 C)的补集,但其余区域保持透明?

请忽略二进制数。

在此处输入图片描述

如果不提前找到交点,是否可以用纯色填充(A 并集 B 并集 C)的补集,而其余区域保持透明?

答案1

使用中描述的方法如何在 TikZ 中反转“剪辑”选择?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\tikzstyle{reverseclip}=[insert path={(current page.north east) --
  (current page.south east) --
  (current page.south west) --
  (current page.north west) --
  (current page.north east)}
]

\begin{tikzpicture}[remember picture]

\draw [gray!20, ultra thick] (-3,-3) grid (3,3);

\begin{pgfinterruptboundingbox}
\path  [clip] (90:0.7cm) circle [radius=1cm] [reverseclip];
\path  [clip] (-30:0.7cm) circle [radius=1cm] [reverseclip];
\path  [clip] (210:0.7cm) circle [radius=1cm] [reverseclip];
\end{pgfinterruptboundingbox}

\fill [orange] (-2,-2) rectangle (2,2);
\end{tikzpicture}
\end{document}

答案2

需要最新pstricks.texhttp://texnik.dante.de/tex/generic/pstricks/几天后将在 CTAN 上线

\documentclass{minimal}
\usepackage{pstricks}\SpecialCoor

\begin{document}

\begin{pspicture}(-3,-3)(3,3)\psgrid[gridlabels=0pt]
  \pscustom[linestyle=none]{%
  \pspolygon(-2,-2)(-2,2)(2,2)(2,-2)
  \moveto(0.7;90)\rmoveto(1,0)\pscircle(0.7;90){1}
  \moveto(0.7;-30)\rmoveto(1,0)\pscircle(0.7;-30){1}
  \moveto(0.7;210)\rmoveto(1,0)\pscircle(0.7;210){1}
  \closepath
  \code{eoclip}
  \pspolygon(-2,-2)(-2,2)(2,2)(2,-2)
  \fill[fillcolor=blue!60,fillstyle=solid,linestyle=none]}
\end{pspicture}

\end{document}

但圆圈处仍有一些小线条:

在此处输入图片描述

相关内容