|
- \documentclass[tikz,border=5pt]{standalone}
- \usetikzlibrary{calc}
- \usetikzlibrary{arrows.meta}
- \usepackage{tikz-3dplot}
- \begin{document}
- \tdplotsetmaincoords{70}{110}
- \begin{tikzpicture}[>=latex,scale=2,tdplot_main_coords]
- \pgfmathsetmacro{\x}{1.4}
- \pgfmathsetmacro{\y}{1.2}
- \pgfmathsetmacro{\z}{1.2}
- \path
- (\x,0,0) coordinate (A) (\x,\y,0) coordinate (B) (0,\y,0) coordinate (C) (0,0,0) coordinate (D)
- (\x,0,\z) coordinate (E) (\x,\y,\z) coordinate (F) (0,\y,\z) coordinate (G) (0,0,\z) coordinate (H)
- (2.5*\x,0,0) coordinate (I) (2.5*\x,\y,0) coordinate (J)
- (\x,2.5*\y,0) coordinate (K) (0,2.5*\y,0) coordinate (L)
- (2.5*\x,2.5*\y,0) coordinate (M);
- \draw[canvas is xy plane at z = 0, transform shape, draw = red, fill = red!50, opacity = 0.5] (B) rectangle (D);
- \node[canvas is xy plane at z = 0] at (0.5*\x,0.5*\y,0) {\rotatebox[origin=c]{90}{$\Omega_0$}};
- \draw[canvas is xy plane at z = 0, transform shape, dashed, draw = blue, fill = blue!50, opacity = 0.5] (J) rectangle (A);
- \node[canvas is xy plane at z = 0] at (1.75*\x,0.5*\y,0) {\rotatebox[origin=c]{90}{$\Omega_1$}};
- \draw[canvas is xy plane at z = 0, transform shape, dashed, draw = yellow, fill = yellow!50, opacity = 0.5] (B) rectangle (M);
- \node[canvas is xy plane at z = 0] at (1.75*\x,1.75*\y,0) {\rotatebox[origin=c]{90}{$\Omega_2$}};
- \draw[thin,Stealth-Stealth]($(A)+(0,25pt)$) -- node[above,sloped]{$\tiny{a}$}($(B)+(0,26pt)$);
- \draw[thin,Stealth-Stealth] ($(B)+(0,26pt)$) -- node[above,sloped]{$\tiny{a}$}($(C)+(0,25pt)$);
- \draw (A)--(B)--(C)--(D)--(A);
- \draw (A)--(E) (B)--(F) (C)--(G);
- \draw (A)--(I) (B)--(J) (B)--(K) (C)--(L);
- \draw [densely dashed] (D)--(H);
- \end{tikzpicture}
- \end{document}
复制代码
|
|