[Tex/LaTex] Big circular arrow in Tikz

tikz-arrows

I am trying to make following chart in tikz.
enter image description here

I am not able to make the circular arrow properly. Below is the code-

\documentclass[tikz, border=2pt]{standalone}
\usetikzlibrary{shapes.geometric, arrows, positioning}

\tikzset{
  box/.style  = {draw,rectangle, minimum width=5cm, minimum height=1.2cm, text centered, text width=5cm, font=\Large},
  myarrow/.style = {line width=2mm, draw=blue, -triangle 60, fill=blue!40,postaction={draw, line width=4mm, shorten >=6mm, -}}
}


\begin{document}
\begin{tikzpicture}[node distance=4cm]
    \node (n00) [box, draw=red, fill=red!40] {C\# based Game Environment in PC};
    \node (n10) [box, draw=orange, fill=orange!40, below of=n00, xshift=-4cm] {Display based on Projector for Visual Feedback};
    \node (n11) [box, draw=orange, fill=orange!40, below of=n00, xshift=+4cm] {Audio feedback from Speaker};
    \node (n20) [box, draw=green, fill=green!40, below of=n10, xshift=+4cm] {Player};

    \draw [myarrow] (n00) -- (n10);
    \draw [myarrow] (n00) -- (n11);
    \draw [myarrow] (n10) -- (n20);
    \draw [myarrow] (n11) -- (n20);
    \draw [myarrow] (n11) -- (n20);
    \draw [myarrow] (n20) to [bend right=40] (n00);

\end{tikzpicture}
\end{document}

See the generated document-
enter image description here

One can clearly notice that-

  1. The arrows are not properly placed, such as the tail of arrow is always at the front of source node.
  2. The arrows were are expected to be filled with light blue i.e. blue!40 with blue color border, but it didn't
  3. The circular arrow is rendered on the top of right node.

Any workaround please.

Best Answer

For example, you can use background layers:

\documentclass[tikz, border=2pt]{standalone}
\usetikzlibrary{shapes.geometric, arrows, positioning}
\usetikzlibrary{backgrounds}


\tikzset{
  box/.style  = {draw,rectangle, minimum width=5cm, minimum height=1.2cm, text centered, text width=5cm, font=\Large},
  myarrow/.style = {line width=2mm, draw=blue, -triangle 60, postaction={draw, line width=4mm, shorten >=6mm, -}}
}


\begin{document}
\begin{tikzpicture}[node distance=4cm]
    \node (n00) [box, draw=red, fill=red!40] {C\# based Game Environment in PC};
    \node (n10) [box, draw=orange, fill=orange!40, below of=n00, xshift=-4cm] {Display based on Projector for Visual Feedback};
    \node (n11) [box, draw=orange, fill=orange!40, below of=n00, xshift=+4cm] {Audio feedback from Speaker};
    \node (n20) [box, draw=green, fill=green!40, below of=n10, xshift=+4cm] {Player};

    \begin{scope}[on background layer]
        \draw [myarrow] (n00) -- (n10);
        \draw [myarrow] (n00) -- (n11);
        \draw [myarrow] (n10) -- (n20);
        \draw [myarrow] (n11) -- (n20);
        \draw [myarrow] (n11) -- (n20);
        \draw [myarrow] (n20.east)  to [out=0, in=0, looseness=3] node[left]{sensor} (n00.east);
    \end{scope}

\end{tikzpicture}
\end{document}

to have

enter image description here

notice that you have probably to set the bounding box manually, look at Bounding box is larger than expected when drawing a curved path

Notice that the arrows are lines --- not path that can be filled; so to have a big arrow with outlines in different colors you have to do things like Paul Gaborit's answer:

\tikzset{
  double -latex/.style args={#1 colored by #2 and #3}{    
    -latex,line width=#1,#2,
    postaction={draw,-latex,#3,line width=(#1)/3,shorten <=(#1)/4,shorten >=4.5*(#1)/3},
  },
  box/.style  = {draw,rectangle, minimum width=5cm, minimum height=1.2cm, text centered, text width=5cm, font=\Large},
  myarrow/.style = {double -latex=4mm colored by blue and blue!40},
}

which gives:

enter image description here

Related Question