答案1
欢迎来到 TeX.SE!
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[dashed,thick] (-1,0) -- (0,0.5) edge (0,2.5) -- (1,0);
\draw[thick] (-1,0) rectangle (1,2) -- (0,2.5) -- (-1,2);
\end{tikzpicture}
\end{document}
对于更高级的应用程序我推荐tikz-3dplot
或asymptote
。
一些标签,按照要求。只是为了确认一下:这不是排版服务。所以请尝试自己做点什么!
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[dashed,thick] (-1,0) -- (0,0.5) edge (0,2.5) -- (1,0) coordinate(BR);
\draw[thick] (-1,0) coordinate(BL) rectangle (1,2) coordinate(TR)
-- (0,2.5) coordinate(T) -- (-1,2) coordinate(TL);
\foreach \X [remember=\X as \Y (initially TL),count=\Z] in {BL,BR,TR,T,TL}
{\path (\Y) -- (\X) node[midway,anchor={90*\Z-90-ifthenelse(\Z==4,45,0)-ifthenelse(\Z==5,45,0)}]{label \Z}; }
\end{tikzpicture}
\end{document}
答案2
PSTricks 提供了一个不错的解决方案。
\documentclass[pstricks,12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}(8,10)
\pstGeonode[PosAngle={180,0,45}](1,1){A}(7,1){B}(4,4){C}(4,9){F}
\pstTranslation[PosAngle={180,0}]{C}{F}{A,B}[D,E]
\psline(E)(F)(D)(A)(B)(E)(D)
\psset{linestyle=dashed}
\psline(A)(C)(B)
\psline(C)(F)
\end{pspicture}
\end{document}