你能帮我加阴影吗?我需要做的是给上传的照片中出现的五个区域加阴影,并将它们全部放在一个框框里。这是我的尝试。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,shapes.geometric}
\begin{document}
\begin{tikzpicture}
\tikzset{
elps/.style 2 args={draw,ellipse,minimum width=#2,minimum height=#1},
node distance=3cm,
font=\footnotesize,
>=latex,
}
\node(x)[elps={2.2cm}{1.2cm},label={below left:$dom\ a_{1}\beta a_{2}$}]{};
\node(y)[elps={2.2cm}{1.2cm},right=of x,label={above right:$im(a_{1})$}]{};
\node(z)[elps={1.2cm}{2.2cm},below=.-1.2cm of y]{};
\node(v)[elps={1.2cm}{2.2cm},below right =1.3cm of z,label={below left:$V$}]{};
\node(w)[elps={2.2cm}{1.2cm}, right=-1cm of v]{};
\node(r)[elps={2.2cm}{1.2cm}, right=1cm of w]{};
\draw[->](z)to node[above]{$\beta$}(v);
\draw[->](x)to[bend left]node[above]{$a_{1}$}(y);
\draw[->](w)to node[above]{$a_{2}$}(r);
\end{tikzpicture}
\end{document}
答案1
我部分遵循了@Symbol 的建议,并在第一个示例中提供了不同的方法。
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\image}{im}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,shapes.geometric,patterns}
\begin{document}
\begin{tikzpicture}
\tikzset{
elps/.style 2 args={draw,ellipse,minimum width=#2,minimum height=#1},
node distance=3cm,
font=\footnotesize,
>=latex,
}
\node(x)[elps={2.2cm}{1.2cm},label={below right:$\dom a_{1}\beta a_{2}$}]{};
\fill[blue!30] (x.south) arc[start angle=-90,end angle=0,x radius=0.6cm,y
radius=1.1cm] -- (x.east) -- (x.center) -- cycle;
\node(y)[elps={2.2cm}{1.2cm},right=of x,label={above:$\image(a_{1})$}]{};
\node(z)[elps={1.2cm}{2.2cm},below=.-1.2cm of y,label={right:$\dom \beta q_2\subset \dom\beta$}]{};
\begin{scope}
\clip (z.center) circle[x radius=1.1cm, y radius=0.6cm] ;
\fill[gray!30] ($(z.south)$) rectangle (z.north -| z.east);
\clip (y.center) circle[y radius=1.1cm, x radius=0.6cm];
\fill[blue!30] ($(y.center)+(0,0.2cm)$) rectangle ($(z.south east)+(0,-0.3cm)$);
\end{scope}
\draw[dashed,-latex] (x.-20) to[bend left=10] ($(y.center)!0.5!(y.south)$);
\node(v)[elps={1.2cm}{2.2cm},below right =1.3cm of z,label={below left:$V$}]{};
\node(w)[elps={2.2cm}{1.2cm}, right=-1cm of v]{};
\begin{scope}
\clip (v.center) circle[x radius=1.1cm, y radius=0.6cm];
\clip (w.center) circle[y radius=1.1cm, x radius=0.6cm] ;
\fill[blue!30] (v.south) rectangle ($(v.north)+(0.7cm,0)$);
\end{scope}
\node(r)[elps={2.2cm}{1.2cm}, right=1cm of w]{};
\draw[->](z)to node[above]{$\beta$}(v);
\draw[->](x)to[bend left]node[above]{$a_{1}$}(y);
\draw[->](w)to node[above]{$a_{2}$}(r);
\begin{scope}
\clip (r.center) circle[y radius=1.1cm, x radius=0.6cm] ;
\fill[blue!30] ($(r.south)+(0.2cm,0)$) rectangle ($(r.east)+(0,-0.2cm)$);
\end{scope}
\draw (r.south) -- (r.center) -- (r.east);
\end{tikzpicture}
\end{document}