Desenhe entre formas no Tikz

Desenhe entre formas no Tikz

Estou tentando traçar linhas do círculo central (Assembleia Geral) até os círculos do Conselho Econômico e Social e do Tribunal Penal Internacional, de modo que o ângulo de incidência da linha em todos os três círculos seja 0 graus, ou seja, a linha esteja em um Ângulo de 90 graus em relação à superfície do círculo. No momento, isso é o que eu tenho.

\documentclass{article}
\usetikzlibrary{calc}
\usetikzlibrary{matrix, shapes}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{snakes}
\usetikzlibrary{positioning, intersections}
\pgfplotsset{compat=1.10}
\begin{document}

    \begin{figure}[H]
    \label{fig:structure}
    \centering
    \begin{tikzpicture}
    \node[xshift=6cm,draw,regular polygon, regular polygon sides=4,text width=3cm,align=center] (sa)
      {{\Large Specialized agencies}:\\
      \textbullet FAO\\
      \textbullet ILO\\
      \textbullet ITU\\
      \textbullet WHO};
      \node[minimum size= 4.5cm, xshift=12cm,draw,circle, text width=3cm,align=center] (ga) {\Large{General Assembly}\\
      \small{1 nation, 1 vote}};
      \node[xshift=12cm,yshift=-5cm,draw, circle, text width=3cm,align=center] (sc) {\Large Security Council\\
      \small{5 permanent members\\
      10 rotating members chosen by GA}};
        \node[xshift=12cm,yshift=5cm,draw,circle, text width=3cm,align=center] (sg) {\Large Secretary General\\
      \small{Supports GA decisions}};
          \node[xshift=17cm,yshift=2cm,draw,circle, text width=3cm,align=center] (ecsoc) {\Large Economic and Social Council
    };
          \node[xshift=17cm,yshift=-2cm,draw,circle, text width=3cm,align=center] (icc) {\Large International Criminal Court
    };
    \draw (sa.east) -- (ga.west);
    \draw (sg.south) -- (ga.north);
    \draw (sc.north) -- (ga.south);
    \draw (ga.east) -- (ecsoc.west);
    \draw (ga.east) -- (icc.west);
    \end{tikzpicture}
    \caption{Structure of the United Nations}
    \end{figure}

\end{document}

gráfico

Responder1

Se você quer dizer que eles devem ser perpendiculares à borda do círculo, em vez de --, use edge[out=0, in=180]como em \draw (ga.east) edge[out=0, in=180] (ecsoc.west);. Desta forma a linha sai em 0 graus (direita) e entra em 180 (esquerda).

Além disso, escreva todas as bibliotecas Tikz em um só lugar, separadas por vírgula,depoisvocê chama o pacote Tikz para que ele não crie erros. Normalmente listo todos os pacotes necessários e as bibliotecas, quando aplicável, depois de todos eles. Dessa forma também fica mais fácil de entender e mais organizado.

figura 1

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}

\usetikzlibrary{positioning, intersections, calc, matrix, shapes, snakes}
\pgfplotsset{compat=1.10}

\begin{document}

    \begin{figure}[H]
    \label{fig:structure}
    \centering
    \begin{tikzpicture}
    \node[xshift=6cm,draw,regular polygon, regular polygon sides=4,text width=3cm,align=center] (sa)
      {{\Large Specialized agencies}:\\
      \textbullet FAO\\
      \textbullet ILO\\
      \textbullet ITU\\
      \textbullet WHO};
      \node[minimum size= 4.5cm, xshift=12cm,draw,circle, text width=3cm,align=center] (ga) {\Large{General Assembly}\\
      \small{1 nation, 1 vote}};
      \node[xshift=12cm,yshift=-5cm,draw, circle, text width=3cm,align=center] (sc) {\Large Security Council\\
      \small{5 permanent members\\
      10 rotating members chosen by GA}};
        \node[xshift=12cm,yshift=5cm,draw,circle, text width=3cm,align=center] (sg) {\Large Secretary General\\
      \small{Supports GA decisions}};
          \node[xshift=17cm,yshift=2cm,draw,circle, text width=3cm,align=center] (ecsoc) {\Large Economic and Social Council
    };
          \node[xshift=17cm,yshift=-2cm,draw,circle, text width=3cm,align=center] (icc) {\Large International Criminal Court
    };
    \draw (sa.east) -- (ga.west);
    \draw (sg.south) -- (ga.north);
    \draw (sc.north) -- (ga.south);
    \draw (ga.east) edge[out=0, in=180] (ecsoc.west);
    \draw (ga.east) edge[out=0, in=180] (icc.west);
    \end{tikzpicture}
    \caption{Structure of the United Nations}
    \end{figure}

\end{document}

A propósito, você pode modificar a aparência da curva adicionando a chave "frouxidade". O padrão é 1, 0 cria uma linha reta e números crescentes acentuam a curva. Aqui está um exemplo (o preto é o padrão, ou 1):

Figura 2

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\usetikzlibrary{positioning, intersections, calc, matrix, shapes, snakes}
\pgfplotsset{compat=1.10}

\begin{document}

    \begin{tikzpicture}
    \node[draw, circle, text width=3cm, align=center] (ga) {\Large General Assembly};
    \node[draw, circle, text width=3cm, align=center, xshift=6cm, yshift=3cm] (ecsoc) {\Large Economic and Social Council};

    \draw[green] (ga.east) edge[out=0, in=180, looseness=0] (ecsoc.west);
    \draw (ga.east) edge[out=0, in=180, looseness=1] (ecsoc.west);
    \draw[red] (ga.east) edge[out=0, in=180, looseness=5] (ecsoc.west);
    \draw[blue] (ga.east) edge[out=0, in=180, looseness=10] (ecsoc.west);

    \end{tikzpicture}

\end{document}

informação relacionada