Tikz用斜二测法画正四面体

发布于 2024-05-21 18:45:28
\documentclass[tikz]{standalone}
%x轴正向-135°,缩放0.5;y轴正向为东;z轴正向为北。
\tikzset{xyz/.style={x={(-135:0.5)},y={(1cm,0)},z={(0,1cm)}}}
\tikzstyle{every node}=[font=\small]
\begin{document}
    \begin{tikzpicture}[xyz,line width=0.7pt,line join =round,scale=2]
        \coordinate(A)at(0.577,1,0);
        \coordinate(B)at(0.577,-1,0);
        \coordinate(C)at(-1.15,0,0);
        \coordinate(D)at(0.577,0,0);
        \coordinate(V)at(0,0,1.63);
        \draw(V)--(A)--(B)--(V)--(D);
        \draw[dashed,line width=0.4pt](B)--(C)--(A)(D)--(C)--(V);
        \node[shift={(90:5pt)}] at (V){$V$};
        \node[shift={(-135:5pt)}] at (A){$A$};
        \node[shift={(-135:5pt)}] at (B){$B$};
        \node[shift={(160:7pt)}] at (C){$C$};
        \node[shift={(-90:6pt)}] at (D){$D$};
    \end{tikzpicture}
    
\end{document}
1 条评论

发布
问题