答案1
对于类似 3d 的绘图,我推荐tikz-3dplot
。
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\begin{tikzpicture}[line join=miter]
\draw[thick] (-1.9,-1.9) grid (1.9,1.9);
\draw[thick,latex-latex] (-1,-1) -- (1,1);
\draw[thick,latex-latex] (-1,1) -- (1,-1);
\fill (0,0) circle (2pt);
%
\tdplotsetmaincoords{70}{-30}
\begin{scope}[xshift=5cm,tdplot_main_coords]
\draw[dashed] (-1,1,-1) -- (1,1,-1) -- (1,-1,-1) (1,1,-1) -- (1,1,1);
\draw[thick] (1,1,1) -- (1,-1,1) -- (-1,-1,1) -- (-1,1,1) -- cycle
(1,-1,1) -- (1,-1,-1) -- (-1,-1,-1) -- (-1,1,-1) -- (-1,1,1)
(-1,-1,-1) -- (-1,-1,1);
\foreach \X in {-1,1}
{\foreach \Y in {-1,1}
{\foreach \Z in {-1,1}
{\draw[-latex] (0,0,0) -- (\X,\Y,\Z);}}}
\fill (0,0,0) circle (2pt);
\end{scope}
%
\begin{scope}[xshift=10cm]
\draw[thick] (-1.9,-1.9) grid (1.9,1.9);
\draw[thick,latex-latex] (-1,0) -- (1,0);
\draw[thick,latex-latex] (0,1) -- (0,-1);
\fill (0,0) circle (2pt);
\end{scope}
\end{tikzpicture}
\end{document}