如何编写该图的代码如下:

如何编写该图的代码如下:

在此处输入图片描述

我是这个方面的初学者,有人能帮助我吗?

答案1

作为起点,仅剩图片。

\documentclass[tikz,margin=3mm]{standalone}

\tikzset{
 reddot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=red},
 graydot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=gray},
 blackdot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=black},
}

\begin{document}

  \begin{tikzpicture}[>=latex]
  \foreach \x in {0,1,2}{
\node at (\x,0) [reddot] (\x) {};}
\node at (0.5,0.5) [blackdot] (3) {};
\node at (1.5,0.5) [graydot] (4) {};
\node at (0.5,-0.5) [graydot] (5) {};
\node at (1.5,-0.5) [blackdot] (6) {};
\node at (1,1) [reddot] (7) {};
\node at (1,-1) [reddot] (8) {};
\draw (0,1)--(3)--(4)--(2,1);
\draw (0,-1)--(5)--(6)--(2,-1);
\draw (3)--(5) (4)--(6);
\draw [red,->](7)--(1);
\draw [red,->](8)--(1);
\draw [red,->](1)--(0);
\draw [red,->](1)--(2);
\draw[red,,->] (2) arc[radius=1, start angle=0, end angle= 90];
\draw[red,,->] (0) arc[radius=1, start angle=180, end angle= 270];
  \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容