答案1
\documentclass[border=20, tikz]{standalone}
\usetikzlibrary{3d}
\begin{document}
\begin{tikzpicture}[>=latex]
\fill [canvas is zx plane at y=0, gray] (-2, 0) rectangle (0, 3);
\fill [yellow] (0, -1) rectangle (3, 1);
\fill [canvas is zx plane at y=0, gray] (0, 0) rectangle (2, 3);
\draw [canvas is zx plane at y=0, ->, thick] (0, 0) -- (2, 0) node [left] {\(b\)};
\draw [canvas is zx plane at y=0, ->, thick] (2, 3) -- (-2, 3) node [right] {\(b\)};
\draw [->, thick] (0, 0) -- (0, 1) node [above] {\(a\)};
\draw [->, thick] (3, -1) -- (3, 1) node [above] {\(a\)};
\draw [thick] (0, -1) -- ++ (0, 0.23);
\end{tikzpicture}
\end{document}
要改变黄色飞机的颜色,只需将其更改yellow
为您想要的颜色即可。
答案2
如果您想使用一些不透明度,这里有一个解决方案:
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[
plana/.style={pink,opacity=0.8},
planb/.style={purple!50,opacity=0.8},
arr/.style={-Stealth, line width=2pt}
]
\def\L{6} \def\H{4} \def\S{1}
\fill[plana] (0,0) rectangle (\L,-\H/2);
\draw[line width=2pt] (0,-\H/2) -- (0,0);
\fill[planb] (-\S,-\S) --++ (\L,0) --++ (2*\S,2*\S) --++ (-\L,0) -- cycle;
\draw[arr] (\S,\S) --++ (-2*\S,-2*\S) node [pos=1.1] {$b$};
\fill[plana] (0,0) rectangle (\L,\H/2);
\draw[arr] (-\S+\L,-\S) --++ (2*\S,2*\S) node [pos=1.1] {$b$};
\draw[arr] (\L,-\H/2) --++ (0,\H) node [pos=1.1] {$a$};
\draw[arr] (0,0) --++ (0,\H/2) node [pos=1.2] {$a$};
\end{tikzpicture}
\end{document}