答案1
这是一个使用的解决方案蒂克兹。tikz 使用的“视角”与问题中的略有不同。
以下是代码:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[inside/.style={fill=cyan!80,draw opacity=0.5,thick},
outside/.style={thick},
every node/.style={font=\tiny}]
\draw[inside](-1,-1,-1)--(-1,1,-1)--(-1,1,1)--(-1,-1,1)--(-1,-1,-1);
\draw[inside](-1,-1,-1)--(1,-1,-1)--(1,-1,1)--(-1,-1,1)--(-1,-1,-1);
\draw[inside](-1,-1,-1)--(1,-1,-1)--(1,1,-1)--(-1,1,-1)--(-1,-1,-1);
\draw[inside](1,1,1)--(1,-1,1)--(1,-1,-1)--(1,1,-1)--(1,1,1);
\draw[inside](1,1,1)--(-1,1,1)--(-1,1,-1)--(1,1,-1)--(1,1,1);
\draw[inside](1,1,1)--(-1,1,1)--(-1,-1,1)--(1,-1,1)--(1,1,1);
%% inside frame - this shouldn't be necessary...
\draw[gray](-1,-1,-1)--(-1,1,-1)--(-1,1,1)--(-1,-1,1)--(-1,-1,-1);
\draw[gray](-1,-1,-1)--(1,-1,-1)--(1,-1,1)--(-1,-1,1)--(-1,-1,-1);
\draw[gray](-1,-1,-1)--(1,-1,-1)--(1,1,-1)--(-1,1,-1)--(-1,-1,-1);
%%
\draw[outside](-2,-2,-2)--(-2,2,-2)--(-2,2,2)--(-2,-2,2)--(-2,-2,-2);
\draw[outside](-2,-2,-2)--(2,-2,-2)--(2,-2,2)--(-2,-2,2)--(-2,-2,-2);
\draw[outside](-2,-2,-2)--(2,-2,-2)--(2,2,-2)--(-2,2,-2)--(-2,-2,-2);
\draw[outside](2,2,2)--(2,-2,2)--(2,-2,-2)--(2,2,-2)--(2,2,2);
\draw[outside](2,2,2)--(-2,2,2)--(-2,2,-2)--(2,2,-2)--(2,2,2);
\draw[outside](2,2,2)--(-2,2,2)--(-2,-2,2)--(2,-2,2)--(2,2,2);
\foreach \x in {-1,0,1} {
\draw(\x,-2,2)node[below]{$\x$}--++(0,0,-0.2);
\draw(-2,\x,2)node[left]{$\x$}--++(0.2,0,0);
\draw(2,-2,\x)node[right]{$\x$}--++(-0.2,0,0);
}
\end{tikzpicture}
\end{document}