TikZ에서 루프 화살표 만들기

TikZ에서 루프 화살표 만들기

단어의 아래쪽에서 밖으로 나온 다음 같은 단어의 위쪽으로 순환하는 화살표를 만들려고 합니다. 요점은 "Operations"의 출력이 "Operations"의 입력이기도 함을 설명하기 위한 것입니다.

나의 초기 시도는 단순히 를 사용하는 것이었지만 edge[out = -90, in = 90]단어 주위에 화살표가 반복되지는 않았습니다.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \node at (0,0) (Operations) {Operations};
    \draw [->] (Operations) edge[out = -90, in = 90] (Operations);
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요


편집하다

실제 예에는 위의 노드에서 "작업"을 가리키는 화살표가 있고, "작업"에서 아래의 노드를 가리키는 화살표가 있습니다. 루프 화살표의 시작과 끝은 기존의 두 화살표와 이상적으로 정렬되어야 합니다.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \node at (0,3) (Input) {Input};
    \node at (0,1.5) (Operations) {Operations};
    \node at (0,0) (Output) {Output};
    \draw [->] (Input) -- (Operations);
    \draw [->] (Operations.center) arc (-180:180:1);
    \draw [->] (Operations) -- (Output);
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

답변1

여기에는 세 번째 노드를 추가하고 \node at (1,0) (here) {};화살표 크기를 looseness.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \node at (0,0) (Operations) {Operations};
    \node at (1,0) (here) {};
    \draw [->] (Operations) to[out=-80, in=-90,looseness=2] (here)    to[out=90,in=80,looseness=2] (Operations);
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

답변2

댓글에서 말했듯이 정확한 숫자로

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \node at (0,0) (Operations) {Operations};
    \draw [->] (Operations.south)arc(-160:160:1);
\end{tikzpicture}

\end{document}



또 다른 접근법

\draw[->,shorten <=5pt,shorten >=5pt](Operations.center)arc(-180:180:1);



세 번째 접근 방식

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \node at (0,3) (Input) {Input};
    \node at (0,1.5) (Operations) {Operations};
    \node at (0,0) (Output) {Output};
    \draw [->] (Input) -- (Operations);
    \draw [->] (Operations) -- (Output);
    \draw[->](Operations.south)arc(-180:0:1)coordinate(X)
             (Operations.north)+(2,0)--(X)
             (Operations.north)+(2,0)arc(0:180:1);
\end{tikzpicture}

\end{document}

관련 정보