答案1
下面的代码使用了tikz
包。
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (a) at (4,2.5);
\coordinate (b) at (3,.8);
\coordinate (c) at (5,0);
\coordinate (d) at (5.3,1.2);
\coordinate (e) at (0,0);
\draw[thick, fill=black!10] (a) -- (b) -- (e) -- cycle;
\draw[thick, fill=black!20] (a) -- (b) -- (c) -- (d) -- cycle;
\draw[thick, fill=black!30] (b) -- (c) -- (e) -- cycle;
\draw[very thick] (a) -- (c);
\draw[thick, dash dot dot] (b) -- (d);
\fill[black!20, draw=black, thick] (a) circle (3pt) node[black, above right] {$a$};
\fill[black!20, draw=black, thick] (b) circle (3pt) node[black, above left] {$b$};
\fill[black!20, draw=black, thick] (c) circle (3pt) node[black, below right] {$c$};
\fill[black!20, draw=black, thick] (d) circle (3pt) node[black, above right] {$d$};
\fill[black!20, draw=black, thick] (e) circle (3pt) node[black, below left] {$e$};
\end{tikzpicture}
\end{document}
结果是
您可以进一步调整位置和anchor
snode
以获得您想要的标签对齐方式。
答案2
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\psset{viewpoint=40 -10 10 rtp2xyz,lightsrc=viewpoint,Decran=30}
\begin{pspicture}[solidmemory](-2,-2)(3,3)
\psSolid[object=tetrahedron,r=3,action=draw*,name=T]% without 0
\psSolid[object=point,definition=solidgetsommet,args=T 0,text=d,pos=uc]% Point T0 %(top)
\psSolid[object=point,definition=solidgetsommet,args=T 1,text=c,pos=cl]% Point T1
\psSolid[object=point,definition=solidgetsommet,args=T 2,text=b,pos=dc]% Point T1
\psSolid[object=point,definition=solidgetsommet,args=T 3,text=a,pos=cr]% Point T1
\end{pspicture}
\end{document}