答案1
是的,有。您可以使用perspective
库安装正交投影,并使用库在 xy 平面上进行投影3d
。可以通过调整视角来控制平面之间的距离,并\Z
在 中引入 的预因子canvas is xy plane at z=-\Z
。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3d,perspective}
\begin{document}
\begin{tikzpicture}[3d view={20}{12}]
\foreach \Z in {0,...,4}
{\begin{scope}[canvas is xy plane at z=-\Z,transform shape]
\ifnum\Z>0
\draw (0,0) grid[step={pow(2,2-\Z)}] (4,4);
\fi
\draw[semithick,red] (0,0) coordinate(p\Z) rectangle (4,4);
\end{scope}
\path (p\Z) node[left]{$\mathcal{D}_{\Z}(Q)$};}
\end{tikzpicture}
\end{document}