我得到了这张 Desarguesean 网络配置图,我希望能够用不同的字母标记特定的点。
我几乎没有使用 tikz 的经验。以下是目前的代码:
\begin{tikzpicture}
\tikzstyle{point1}=[ball color=cyan, circle, draw=black, inner sep=0.1cm]
\tikzstyle{point2}=[ball color=green, circle, draw=black, inner sep=0.1cm]
\tikzstyle{point3}=[ball color=red, circle, draw=black, inner sep=0.1cm]
\node (v1) at (0,8) [ball color=blue, circle, draw=black, inner sep=0.1cm] {};
\node (v2) at (0,6) [point1] {};
\node (v3) at (2,5.5) [point1] {};
\node (v4) at (1.5,4) [point1] {};
\node (v5) at (0,0) [point2] {};
\node (v6) at (2.75*2,8-2.75*2.5) [point2] {};
\node (v7) at (1.5*1.5,8-1.5*4) [point2] {};
\draw (v1) -- (v2) -- (v5);
\draw (v1) -- (v3) -- (v6);
\draw (v1) -- (v4) -- (v7);
\draw (v2) -- (v3) -- (v4) -- (v2);
\draw (v5) -- (v6) -- (v7) -- (v5);
\node (v8) at (intersection of v2--v3 and v5--v6) [point3] {};
\node (v9) at (intersection of v2--v4 and v5--v7) [point3] {};
\node (v10) at (intersection of v3--v4 and v6--v7) [point3] {};
\draw (v3) -- (v8) -- (v6);
\draw (v4) -- (v9) -- (v7);
\draw (v4) -- (v10) -- (v7);
\draw (v8) -- (v9) -- (v10);
\end{tikzpicture}
答案1
像这样?
\documentclass[tikz, margin=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[
point/.style = {circle, draw=black, inner sep=0.1cm,
ball color=#1,
node contents={}},
every label/.append style = {font=\footnotesize}
]
\node (v1) at (0,8) [point=blue, label=left:v1];
\node (v2) at (0,6) [point=cyan, label=left:v2];
\node (v3) at (2,5.5) [point=cyan, label=above right:v3];
\node (v4) at (1.5,4) [point=cyan, label=left:v4];
\node (v5) at (0,0) [point=green,label=left:v5];
\node (v6) at (2.75*2,8-2.75*2.5) [point=green, label=below:v6];
\node (v7) at (1.5*1.5,8-1.5*4) [point=green, label=below:v7];
%
\draw (v1) -- (v2) -- (v5)
(v1) -- (v3) -- (v6)
(v1) -- (v4) -- (v7)
(v2) -- (v3) -- (v4) -- (v2)
(v5) -- (v6) -- (v7) -- (v5);
\node (v8) at (intersection of v2--v3 and v5--v6) [point=red];
\node (v9) at (intersection of v2--v4 and v5--v7) [point=red];
\node (v10) at (intersection of v3--v4 and v6--v7) [point=red];
\draw (v3) -- (v8) -- (v6)
(v4) -- (v9) -- (v7)
(v4) -- (v10) -- (v7)
(v8) -- (v9) -- (v10);
\end{tikzpicture}
\end{document}
或者你喜欢在节点中使用标签?