I need this estructure: enter image description here

I have problems to link the quadrates' arrows in one ball/node, and link with the center rectangle afterward.

\usetikzlibrary{shapes.geometric, arrows}

\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=1.5cm,     minimum height=1.5cm,text centered, draw=black, fill=red!30]

\tikzstyle{second} = [rectangle, rounded corners, minimum width=2cm, minimum height=1cm,text centered, draw=black, fill=green!30]

\tikzstyle{arrow} = [thick,->,>=stealth]

\begin{tikzpicture}[node distance=2cm]

\node (1) [startstop, yshift=-2cm] {1};
\node (2) [startstop, below of=1] {2};

\node (3) [startstop,right of=1, xshift=2cm, yshift=4cm ] {3};
\node (4) [startstop,right of=3] {4};

\node (5) [second,right of=1, xshift=3cm, yshift=-1cm  ] {5};

\draw [arrow] (1) -| (5);

enter image description here

I would like also ask if there are a some better way to create this diagram which the way that I use. For example, to put the diagrams like (1,1)...

Thank you for all.

2 Answers 2


enter image description here

\documentclass[11pt, tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, calc, positioning}

\tikzset{flow chart/.style = {
     base/.style = {rectangle, rounded corners, draw, inner sep=2mm, outer sep=0mm},
startstop/.style = {base,  fill=red!3, minimum size=15mm},
   second/.style = {base, minimum width=2cm, minimum height=1cm, fill=green!30},
      dot/.style = {circle, fill=black, minimum size=1mm,
                    inner sep=0pt, outer sep=0pt, node contents={}},
       LA/.style = {thick,-Stealth}
        }% end tikzset

    \begin{tikzpicture}[flow chart,
        node distance=6mm and 12mm
\node (n1)  [startstop] {1};
\node (n2)  [startstop, below=of n1] {2};
\node (n3)  [dot, right=of $(n1.east)!0.5!(n2.east)$];
\node (n4)  [second, right=of n3] {3};
\node (n5)  [dot, right=of n4];
\node (n6)  [startstop, right=of n1 -| n5]  {4};
\node (n7)  [startstop, right=of n2 -| n5]  {5};
\node (n8)  [dot, above=of n4];
\node (n9)  [startstop, above=of n8 -| n4.west]  {6};
\node (n10) [startstop, above=of n8 -| n4.east]  {5};
% only simple sines ... i don't know arrows orientations
\draw[semithick]    (n1) -| (n3) |- (n2)
                    (n3) -- (n4)
                    (n4) -- (n5)
                    (n6) -| (n5) |- (n7)
                    (n4) -- (n8)
                    (n9) |- (n8) -| (n10);

If the structure is complex, maybe a matrix of nodes could be useful. Otherwise, see if this can get you started:

    ball/.style = {
        minimum size=10pt,
    box/.style = {
        minimum width=1cm, 
        minimum height=1cm,
    rect/.style = {
        minimum width=2cm,
\begin{tikzpicture}[node distance = 2cm and 1cm,
    \node at(0,0)  [rect] (central) {rect};    
    \node [left of=central, ball] (ball1) {};
    \node [above left of=ball1, box] (box1) {1};
    \node [below left of=ball1, box] (box2) {2};
    \draw [thick, <-] (central) -- (ball1) ;
    \draw [thick, <-] (ball1) |- (box1);
    \draw [thick, <-] (ball1) |- (box2);

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .