double line
我尝试用其他颜色填充两个 s 的交集,但没有成功。以下是最简单的工作示例:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (Emetteur) at (0,0) {};
\node (Recepteur) at (2.5,0) {};
\node (Recepteur2) at (-2.5,0) {};
\node (Cible) at (1,3) {};
\draw [black!15, double = black!15, double distance = 5] (1.25,0) ellipse (6cm and 3.025cm);
\draw [black!15, double = black!15, double distance = 5] (-1.25,0) ellipse (6cm and 3.25cm);
\draw (-4,0) -- (4,0);
\draw (Emetteur) node {$\bullet$} node [below] {\'Emetteur};
\draw (Recepteur) node {$\bullet$} node [below] {R\'ecepeur 1};
\draw (Recepteur2) node {$\bullet$} node [below] {R\'ecepeur 2};
\draw (Cible) node {$\bullet$} node [above=0.1cm, align = center] {Cible};
\draw [blue] (Emetteur) -- (Cible) node [midway, sloped, above] {$d_1$};
\draw [red] (Cible) -- (Recepteur) node [pos = 0.5, sloped, above] {$d_2$};
\draw [green!50!black] (Cible) -- (Recepteur2) node [pos = 0.5, sloped, above] {$d_3$};
\end{tikzpicture}
\end{document}
我得到以下结果:
我找到了一种使用该opacity
选项的方法:
\draw [black!15, double = black!50, double distance = 5, opacity = 0.2] (1.25,0) ellipse (6cm and 3.025cm);
\draw [black!15, double = black!50, double distance = 5, opacity = 0.2] (-1.25,0) ellipse (6cm and 3.25cm);
然后我得到:
这只是一个技巧,因为两个透明形状的叠加会产生另一种颜色,但我宁愿避免这种opacity
选择,因为打印时渲染效果很差,而且我无法得到我想要的颜色的交集。
有什么线索吗?
答案1
您可以使用blend
ing
\begin{scope}[blend group=multiply]
\draw [black!15, double = black!15, double distance = 5] (1.25,0) ellipse (6cm and 3.025cm);
\draw [black!15, double = black!15, double distance = 5] (-1.25,0) ellipse (6cm and 3.25cm);
\end{scope}
完整代码:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (Emetteur) at (0,0) {};
\node (Recepteur) at (2.5,0) {};
\node (Recepteur2) at (-2.5,0) {};
\node (Cible) at (1,3) {};
\begin{scope}[blend group=multiply]
\draw [black!15, double = black!15, double distance = 5] (1.25,0) ellipse (6cm and 3.025cm);
\draw [black!15, double = black!15, double distance = 5] (-1.25,0) ellipse (6cm and 3.25cm);
\end{scope}
\draw (-4,0) -- (4,0);
\draw (Emetteur) node {$\bullet$} node [below] {\'Emetteur};
\draw (Recepteur) node {$\bullet$} node [below] {R\'ecepeur 1};
\draw (Recepteur2) node {$\bullet$} node [below] {R\'ecepeur 2};
\draw (Cible) node {$\bullet$} node [above=0.1cm, align = center] {Cible};
\draw [blue] (Emetteur) -- (Cible) node [midway, sloped, above] {$d_1$};
\draw [red] (Cible) -- (Recepteur) node [pos = 0.5, sloped, above] {$d_2$};
\draw [green!50!black] (Cible) -- (Recepteur2) node [pos = 0.5, sloped, above] {$d_3$};
\end{tikzpicture}
\end{document}