绘制带有节点和箭头的圆圈

绘制带有节点和箭头的圆圈

我尝试重现这些图表,但不幸的是,没有成功……

在此处输入图片描述

这是我制作的 Tikz:

\usetikzlibrary{arrows.meta}
\usetikzlibrary{bending}
\usetikzlibrary{arrows}

\begin{tikzpicture}[scale=5]
  \def\Radius{.5cm}

  \draw (0cm,0cm) circle[radius=\Radius];

  \fill[radius=.7pt]
    (80:\Radius) circle[color=red] node[above] (1) {1}
    (40:\Radius) circle[] node[above right] (8) {8}
    (0:\Radius) circle[] node[right] (14) {14}
    (-40:\Radius) circle[] node[right] (21) {21}
    (-90:\Radius) circle[] node[below] (32) {32}
    (-120:\Radius) circle[] node[below] (38) {38}
    (-140:\Radius) circle[] node[below left] (42) {42}
    (-180:\Radius) circle[] node[below left] (48) {48}
    (-200:\Radius) circle[] node[left] (51) {51}
    (-220:\Radius) circle[] node[above left] (52) {52};

    \draw [->] (8) to[out=220,in=90] (32);
\end{tikzpicture}

我的问题是我无法用曲线绘制正确的箭头(还有比例问题……)。

有人有解决方案吗?

真挚地,

赫齐奥德

答案1

每一个都很简单如果你使用循环。

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{bending}

\begin{tikzpicture}[scale=5,font=\sffamily]
  \def\Radius{.5cm}
  \begin{scope}[local bounding box=TR,xshift=1.6cm]
   \draw (0,0) circle[radius=\Radius];
   \foreach \X/\Y [count=\Z,remember=\Y as \LastY] in {80/1,40/8,0/14,-40/21,-90/32,-120/38,-140/42,-180/48,%
   -200/51,-220/56}
   {\node[fill=cyan,draw=black,circle,inner sep=2pt,label=\X:N\Y] (\Y) at (\X:\Radius){}; 
   \ifnum\Z<3
   \else
     \draw[-latex] (\LastY) to[bend right] (\Y);
   \fi}
  \end{scope}
  %
  \begin{scope}[local bounding box=BL,yshift=-1.6cm]
   \draw (0,0) circle[radius=\Radius];
   \foreach \X/\Y [count=\Z] in {80/1,40/8,0/14,-40/21,-90/32,-120/38,-140/42,-180/48,%
   -200/51,-220/56}
   {\node[fill=cyan,draw=black,circle,inner sep=2pt,label=\X:N\Y] (\Y) at (\X:\Radius){}; 
   }
   \foreach \X [evaluate=\X as \Y using {int(2^(\X-1))},
    evaluate=\Y as \Z using {int(40-\Y*170/32)}] in {1,...,6}
   {\ifnum\X=1
     \draw[-latex] (8) to[bend left=50] 
        node[midway,above,scale=0.1,transform shape] {+\Y}(\Z:\Radius)  ;
    \else
     \draw[-latex] (8) to[bend right=40] node[midway,left,scale=0.1,transform shape] {+\Y}
     (\Z:\Radius);
    \fi}
  \end{scope}
  %
  \begin{scope}[local bounding box=BR,xshift=1.6cm,yshift=-1.6cm]
   \draw (0,0) circle[radius=\Radius];
   \foreach \X/\Y in {80/1,40/8,0/14,-40/21,-90/32,-120/38,-140/42,-180/48,%
   -200/51,-220/56}
   {\node[fill=cyan,draw=black,circle,inner sep=2pt,label=\X:N\Y] (\Y) at (\X:\Radius){}; 
   }
   \draw[-latex] (8) to[bend left] (42);
   \draw[-latex] (42) to[bend right] (51);
   \draw[-latex] (51) to[bend right] (56);
  \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

这个可以吗?

在此处输入图片描述

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{bending}
\usetikzlibrary{arrows}

\begin{document}
\begin{tikzpicture}[>=latex]
  \def\Radius{2.5cm}
  \draw (0cm,0cm) circle[radius=\Radius];
  \fill[radius=2pt,draw=black,fill=cyan]
    (80:\Radius)coordinate   (1)  circle[] node[above] {1}
    (40:\Radius)coordinate   (8)  circle[] node[above right]  {8}
    (0:\Radius) coordinate   (14) circle[] node[right]  {14}
    (-40:\Radius)coordinate  (21) circle[] node[right]  {21}
    (-90:\Radius)coordinate  (32) circle[] node[below]  {32}
    (-120:\Radius)coordinate (38) circle[] node[below]  {38}
    (-140:\Radius)coordinate (42) circle[] node[below left] {42}
    (-180:\Radius)coordinate (48) circle[] node[below left] {48}
    (-200:\Radius)coordinate (51) circle[] node[left] {51}
    (-220:\Radius)coordinate (52) circle[] node[above left]{52};

    \draw [->,shorten <=2pt, shorten >=2pt] (8) to[bend right] (32);
    \draw [->,shorten <=2pt, shorten >=2pt] (8) to[bend right] (48);    
\end{tikzpicture}
\end{document}

答案3

请尝试以下操作

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{tikzpicture}[scale = 5]
\def\Radius{0.5 cm}

\draw (0 cm, 0 cm) circle[radius=\Radius];

\fill[radius = 0.4pt]
(80:\Radius) circle[color=red] node[above] (1) {1}
(40:\Radius) circle[] node[above right] (8) {8}
(0:\Radius) circle[] node[right] (14) {14}
(-40:\Radius) circle[] node[right] (21) {21}
(-90:\Radius) circle[] node[below] (32) {32}
(-120:\Radius) circle[] node[below] (38) {38}
(-140:\Radius) circle[] node[below left] (42) {42}
(-180:\Radius) circle[] node[below left] (48) {48}
(-200:\Radius) circle[] node[left] (51) {51}
(-220:\Radius) circle[] node[above left] (52) {52};

\draw [-{Stealth[round, scale = 1.3]}] (8) to[out = 220, in = 90] (32);
\end{tikzpicture}

\end{document}

我把圆圈上的点变小了,输出看起来像

箭

相关内容