我尝试尽可能简单地为两个椭圆的截距着色。我在这里找到了一些例子:
但我不确定如何将其集成到我的项目中。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{patterns}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[auto,node distance=4cm,>=latex',font=\sffamily]
\node[draw=blue!40,fill=blue!15,fill opacity=0.5,ellipse,minimum width=60mm,minimum height=35mm,align=center](master) at(0,0) {A};
\node[right=-15mm of master,pattern=north west lines,pattern color=blue,draw=blue!40,fill opacity=0.5,ellipse,minimum width=60mm,minimum height=35mm,align=center](slave) {B};
\node[below right=-3mm and -2mm of master,rotate=90,fill opacity=0.5] {C};
\end{tikzpicture}
\end{document}
答案1
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{patterns}
\usetikzlibrary{positioning}
\makeatletter
% from https://tex.stackexchange.com/a/127045/121799
\tikzset{use path/.code=\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1}}
\makeatother
\begin{document}
\begin{tikzpicture}[auto,node distance=4cm,>=latex',font=\sffamily]
\node[draw=blue!40,fill=blue!15,fill opacity=0.5,ellipse,minimum
width=60mm,minimum height=35mm,align=center,
save path=\pathA](master) at(0,0) {A};
\node[right=-15mm of master,pattern=north west lines,pattern
color=blue,draw=blue!40,fill opacity=0.5,ellipse,minimum width=60mm,minimum
height=35mm,align=center,save path=\pathB](slave) {B};
\begin{scope}
\clip[use path=\pathA];
\fill[red] [use path=\pathB];
\end{scope}
\node[below right=-3mm and -2mm of master,rotate=90,fill opacity=0.5] {C};
\end{tikzpicture}
\end{document}