1

Please need suggestions to follow To Draw Rightwards ,Downwards ,curved arrow using TikZ

My suggestion :

    {\tikzset{
    basic/.style  = {text width=2cm,font=\Huge, rectangle,align=center},
     }
 \begin{tikzpicture}[node distance=1cm, auto,minimum size=4em]
   \node[draw,basic,text width=7cm,font=\huge] (a) at (24,22.28){  
    };

  \end{tikzpicture}}

Desired output:

enter image description here

HAITHEM
  • 399
  • A question here, as you already know, should typically revolve around an abstract issue (e.g. "How do I get a curved arrow in this graph?") rather than a concrete application (e.g. "How do I make this graph?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – SebGlav Jan 09 '22 at 11:35
  • @SebGlav thanks for the advice, if I have already a minimum example i would never hesitate to attach it to my question , note that I also have posted several other questions with my suggestions but never get a response, so the problem is not about doing this for me,,, i'm trying to learn from others suggestions ,have a nice day! – HAITHEM Jan 09 '22 at 11:41
  • what have you tried so far, except for the curved arrows? – Black Mild Jan 09 '22 at 11:49
  • @Haithem You're right, I took a look at your history before commenting and didn't mean to be rude or so. It is just a fact that you rarely get answers when everything is left to be done. In this case, this diagram is not so difficult to do if you know a bit about TikZ. Did you take a look at tikzcircuit package? – SebGlav Jan 09 '22 at 11:57
  • @sebglav yes thanks, it is a good start, i found a minimum example on overleaf with tikzcircuit, hope it will be helpful – HAITHEM Jan 09 '22 at 12:08
  • @Haithem please provide a MWE for next questions (if any)! – Black Mild Jan 09 '22 at 12:49
  • 1
    @BlackMild Mild thanks for the help, I'm grateful. I promise I will provide MwE for the next questions, Stay blessed! – HAITHEM Jan 09 '22 at 12:52

1 Answers1

6

Why don't you start a new year with a plain TikZ answer for the without-MWE question?

Technically, this TikZ figure using relevant combinations of node and pic. Some curves are drawn using to[bend left] or to[bend right] options. The operation |- means going first vertically, then horizontally. Arrow is a different issue; here I choose >=stealth.

PS: TikZ is more convenient than Asymptote for such figures, I suppose.

enter image description here

\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}[>=stealth]
\tikzset{Xshape/.pic={\draw[red] (45:.1)--(-135:.1) (-45:.1)--(135:.1);}}   
\tikzset{Sshape/.pic={
\draw[teal,line width=1pt] (35:.3) .. controls +(180:.3) and +(0:.3) .. (-145:.3);}}

\path[nodes={circle,draw,thick}] (0,0) node[fill=pink,minimum size=10mm] (ct) {$c_t$} (-1.5,1.25) node[fill=blue!30] (it) {$i_t$} (-1.5,0) node (Xleft) {} (0,-1) node (Xbelow) {} (3,0) node (Xright) {} (2,2) node[fill=green!50] (ot) {$o_t$} (2,0) node[minimum size=7mm] (Sright) {}
(-2.5,0) node[minimum size=7mm] (Sleft) {} (0,-2) node[fill=yellow] (ft) {$f_t$} ; \path (Xleft.center) pic{Xshape} (Xright.center) pic{Xshape} (Xbelow.center) pic{Xshape} (Sleft.center) pic{Sshape} (Sright.center) pic{Sshape} (ct) +(30:.5) node[right,scale=.8]{Cell} (ot) node[right=4mm,scale=.8]{Output Gate} (it) node[right=4mm,scale=.8]{Input Gate} (ft) node[right=4mm,scale=.8]{Forget Gate} ; \foreach \p/\q in {ct/Sright,Sright/Xright,ct/ot,ot/Xright,ct/it,Sleft/Xleft,Xleft/ct,ft/Xbelow,it/Xleft} \draw[->] (\p)--(\q); \draw[->] (Xright)--+(0:2) node[above left]{$h_t$}; \draw[<-] (Sleft)--+(180:2.25) node[above right]{$x_t$}; \draw[->] (Sleft)+(180:.8) |-(ot); \draw[->] (Sleft)+(180:.8) |-(ft); \draw[->] (Sleft)+(180:.8) |-(it); \draw[->] (ct) to[bend left] (Xbelow.20); \draw[->] (Xbelow.160) to[bend left] (ct); \draw[->] (ct.210) to[bend right=80] (ft.150); \draw[very thick] (-4,-2.5) rectangle (4.25,2.5); \end{tikzpicture} \end{document}

Black Mild
  • 17,569
  • 1
    Very nice! You're right, it's a nice gift for this new year ;) – SebGlav Jan 09 '22 at 17:03
  • @SebGlav as OP complained a bad luck starting here ^^ https://tex.stackexchange.com/q/628669/140722 So I push a good luck to him! his figure is also quite interesting – Black Mild Jan 09 '22 at 17:58