TikZ 交叉口剪辑

TikZ 交叉口剪辑

我想剪切矩形内的圆的部分,我将其设为交点 (c) 和 (d)。但是我怎样才能剪切这两个点 (c) 和 (d) 之间的三角形内的部分呢?

\documentclass[border=12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}

\begin{document}
\begin{tikzpicture}
\draw [name path = zero,dashed](0,0) rectangle(15,15);
 \node[circle,fill=black] at (0,7.5) {};
  \node[circle,fill=black] at (7.5,0) {};
   \node[circle,fill=black] at (15,7.5) {};
    \node[circle,fill=black] at (7.5,15) {};
\draw (11.2,-0.35)--(11.2,0.35);
\draw (11.3,-0.35)--(11.3,0.35);

\draw (14.65,3.7)--(15.35,3.7);
\draw (14.65,3.8)--(15.35,3.8);
\draw [name path =one](0,7.5) circle (7.5); 
\draw [name path =two](7.5,0) circle (7.5); 
\draw [name path =three](15,7.5) circle (7.5); 
\draw [name path =four](7.5,15) circle (7.5);
\draw [name intersections={of=one and zero}] ;
  \coordinate (c)  at (intersection-1);
  \coordinate (d)  at (intersection-2);
    \clip ???
\draw [name intersections={of=three and zero}] ;
\coordinate (a)  at (intersection-1);
\coordinate (b)  at (intersection-2);

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

如果您一开始不画它,那么您不必剪裁任何东西。

在此处输入图片描述

\documentclass[border=12pt]{standalone}
\usepackage{tikz}
\tikzset
  {dot/.style={circle,fill=black},
   doublelines/.style={double,very thick,double distance=1mm}
  }
\begin{document}
\begin{tikzpicture}
\draw[dashed](0,0) rectangle(15,15);
\node[dot] at (0,7.5) {};
\node[dot] at (7.5,0) {};
\node[dot] at (15,7.5) {};
\node[dot] at (7.5,15) {};
\draw[doublelines] (11.25,-0.35)--(11.25,0.35);
\draw[doublelines] (14.65,3.75)--(15.35,3.75);
\draw (0,0)
  arc (270:  90:7.5)
  arc (180:   0:7.5)
  arc ( 90: -90:7.5)
  arc (  0:-180:7.5);
\end{tikzpicture}
\end{document}

另一种解决方案是先画圆形,再画矩形,然后用白色填充矩形。

\documentclass[border=12pt]{standalone}
\usepackage{tikz}
\tikzset
  {dot/.style={circle,fill=black},
   doublelines/.style={double,very thick,double distance=1mm}
  }
\begin{document}
\begin{tikzpicture}
\draw (0,7.5)  circle (7.5); 
\draw (7.5,0)  circle (7.5); 
\draw (15,7.5) circle (7.5); 
\draw (7.5,15) circle (7.5);
\draw[dashed,fill=white] (0,0) rectangle(15,15);
\node[dot] at (0,7.5) {};
\node[dot] at (7.5,0) {};
\node[dot] at (15,7.5) {};
\node[dot] at (7.5,15) {};
\draw[doublelines] (11.25,-0.35)--(11.25,0.35);
\draw[doublelines] (14.65,3.75)--(15.35,3.75);
\end{tikzpicture}
\end{document}

相关内容