画一个带有箭头的圆圈表示循环

画一个带有箭头的圆圈表示循环

如图所示,我已经有三个节点和相互连接的箭头。箭头形成一个循环,我想在三角形区域内添加一个带箭头的圆圈(可能带有文本)以指示形成了一个循环。我该怎么做?

我已经拥有的代码:

\documentclass[border={10pt 10pt 10pt 10pt}]{standalone}

\usepackage{tikz}
\usetikzlibrary{shapes, positioning, arrows.meta, decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}[
    node distance = 3.0cm and 1.5cm,
    sa/.style = {->, thick},
    sb/.style = {->, thick, dashed, red},
    sc/.style = {->, thick, dotted, blue},
    n/.style = {draw, inner sep = 3pt, align = center}]

  \node[n] (ta)
  {Content};
  \node[n, left = of ta] (tb)
  {Content};
  \node[n, below right = of tb] (tc)
  {Content};
  \draw[sa, sloped] (ta) to (tb);
  \draw[sb] (tb) to (tc);
  \draw[sc] (tc) to (ta);

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

作为一个快速技巧,你可以手动添加弧和文本:

\documentclass[border={10pt 10pt 10pt 10pt}]{standalone}

\usepackage{tikz}
\usetikzlibrary{shapes, positioning, arrows.meta, decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}[
    node distance = 3.0cm and 1.5cm,
    sa/.style = {->, thick},
    sb/.style = {->, thick, dashed, red},
    sc/.style = {->, thick, dotted, blue},
    n/.style = {draw, inner sep = 3pt, align = center}]

  \node[n] (ta)
  {Content};
  \node[n, left = of ta] (tb)
  {Content};
  \node[n, below right = of tb] (tc)
  {Content};
  \draw[sa, sloped] (ta) to (tb);
  \draw[sb] (tb) to (tc);
  \draw[sc] (tc) to (ta);
  \draw[->,red] (-0.4,-1) arc [radius=0.5cm,start angle=0,end angle=340];
  \node at (-0.4-0.5,-1) {Text};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容