\begin{tikzpicture}[z={(-.3cm,-.2cm)}, % direction z gets projected to; can also change x,y
% use cm to specify non-transformed coordinates
line join=round, line cap=round % makes the corners look nicer
]
\draw (0,1,0) -- (-1,0,0) -- (0,-1,0) -- (1,0,0) -- (0,1,0) -- (0,0,1) -- (0,-1,0) (1,0,0) -- (0,0,1) -- (-1,0,0);
\draw[dashed] (0,1,0) -- (0,0,-1) -- (0,-1,0) (1,0,0) -- (0,0,-1) -- (-1,0,0);
\end{tikzpicture}
答案1
像这样:
这非常简单,只需添加node
到八面体顶点即可。我没有费心选择顶点的名称(标签):
\documentclass[tikz, margin=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[z={(-.3cm,-.2cm)}, % direction z gets projected to; can also change x,y
% use cm to specify non-transformed coordinates
line join=round, line cap=round, % makes the corners look nicer
every node/.style = {inner sep=1pt, font=\scriptsize}
]
\draw ( 0,1,0) node[above] {A} --
(-1,0,0) node [left] {B} --
(0,-1,0) node[below] {C} --
( 1,0,0) node[right] {D} --
( 0,1,0) --
( 0,0,1) node[below left] {E} --
(0,-1,0) (1,0,0) -- (0,0,1) -- (-1,0,0);
\draw[dashed] (0,1,0) -- (0,0,-1) -- (0,-1,0) (1,0,0) -- (0,0,-1) -- (-1,0,0);
\end{tikzpicture}
\end{document}