\definecolor{myred}{HTML}{d01e1e} \definecolor{myblue}{HTML}{0000FF} \definecolor{mygreen}{HTML}{129d1c} \begin{tikzpicture}[>=latex, node distance=1cm, on grid, auto] %, scale=0.6, transform shape] %Seq \node (S1) [draw, regular polygon, regular polygon sides=3, minimum size=1cm, shape border rotate=180, color=mygreen] {}; %{;}; \path (S1.west)+(-0.5,-1) node (SA2) [draw, circle, minimum size=0.5mm, dashed, color=myred] {}; \path (S1.east)+(0.5,-1) node (S2) [draw, rectangle, minimum size=0.5mm, color=mygreen] {}; \path[-,color=mygreen] (SA2) edge (S1); \path[-,color=mygreen] (S1) edge (S2); %A \node (A1) [draw, regular polygon, regular polygon sides=6, minimum size=1cm, color=myred, left of=SA2,xshift=-0.5cm] {}; %{A}; \path (A1.east)+(0.25,1) node (A2) [draw, circle, minimum size=0.5mm, color=myred] {}; \path[-,color=myred] (A1) edge (A2); %B \node (B1) [draw, regular polygon, regular polygon sides=5, minimum size=1cm, color=myblue, right of=S2,xshift=0.5cm] {}; %{B}; \path (B1.west)+(-0.25,1) node (B2) [draw, rectangle, minimum size=0.5mm, color=mygreen, dashed] {}; \path[-,color=myblue] (B2) edge (B1); \path (B2.east)+(1.75,-0.5) node (arrow) [minimum size=0.5cm] {$\longrightarrow$}; \node at (arrow.north) (r) {$r$}; %\path (arrow.west)+(-0.5,0) node (A) {A;B}; %result \node (rS1) [draw, regular polygon, regular polygon sides=3, minimum size=1cm, shape border rotate=180, color=mygreen, right of=r, xshift=1.5cm,yshift=0.75cm] {}; %{;}; \path (rS1.west)+(-0.5,-1) node (rA2) [draw, circle, minimum size=0.5mm, color=myred] {}; \path (rA2.west)+(-0.25,-1) node (rA1) [draw, regular polygon, regular polygon sides=6, minimum size=1cm, color=myred] {}; %{A}; \path (rS1.east)+(0.5,-1) node (rS2) [draw, rectangle, minimum size=0.5mm, color=mygreen] {}; \path (rS2.east)+(0.25,-1) node (rB1) [draw, regular polygon, regular polygon sides=5, minimum size=1cm, color=myblue] {}; %{B}; \path[-,color=myred] (rA1) edge (rA2); \path[-,color=mygreen] (rA2) edge (rS1); \path[-,color=mygreen] (rS1) edge (rS2); \path[-,color=myblue] (rS2) edge (rB1); \end{tikzpicture}