How to draw disjoint Tori in latex?










3















I would like to draw the following diagram :
enter image description here
I have used the following code generated in Geogebra, but it does not make the diagram which I want.



begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm]
draw (0,4)-- (4,0);
draw (4,0)-- (0,-4);
draw (0,-4)-- (-4,0);
draw (-4,0)-- (0,4);
draw (5.41,-0.03)-- (9.41,3.97);
draw (9.41,3.97)-- (13.41,-0.03);
draw (13.41,-0.03)-- (9.41,-4.03);
draw (9.41,-4.03)-- (5.41,-0.03);
draw [->] (2,2) -- (1.47,2.53);
draw [->] (-1.59,2.41) -- (-2.26,1.74);
draw [->] (2.5,-1.5) -- (1.81,-2.19);
draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
draw [->] (7.11,1.66) -- (7.67,2.22);
draw [->] (11.29,-2.16) -- (11.85,-1.59);
draw [->] (11.26,2.12) -- (11.89,1.5);
draw [->] (6.9,-1.51) -- (7.98,-2.59);
draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));

draw (2.46,-2.36) node $b1$;
draw (2.67,2.47) node $a1$;
draw (-2.17,2.32) node $b1$;
draw (-2.44,-2.18) node $a1$;
draw (-2.13,0.07) node $T1$;
draw (7.39,2.26) node $b2$;
draw (12.1,-2.06) node $b2$;
draw (10.43,-0.69) node $T2$;
draw (11.98,2.38) node $a2$;
draw (7.17,-2.24) node $a2$;

endtikzpicture


It produces :
enter image description here










share|improve this question


























    3















    I would like to draw the following diagram :
    enter image description here
    I have used the following code generated in Geogebra, but it does not make the diagram which I want.



    begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm]
    draw (0,4)-- (4,0);
    draw (4,0)-- (0,-4);
    draw (0,-4)-- (-4,0);
    draw (-4,0)-- (0,4);
    draw (5.41,-0.03)-- (9.41,3.97);
    draw (9.41,3.97)-- (13.41,-0.03);
    draw (13.41,-0.03)-- (9.41,-4.03);
    draw (9.41,-4.03)-- (5.41,-0.03);
    draw [->] (2,2) -- (1.47,2.53);
    draw [->] (-1.59,2.41) -- (-2.26,1.74);
    draw [->] (2.5,-1.5) -- (1.81,-2.19);
    draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
    draw [->] (7.11,1.66) -- (7.67,2.22);
    draw [->] (11.29,-2.16) -- (11.85,-1.59);
    draw [->] (11.26,2.12) -- (11.89,1.5);
    draw [->] (6.9,-1.51) -- (7.98,-2.59);
    draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
    draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
    draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
    draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));

    draw (2.46,-2.36) node $b1$;
    draw (2.67,2.47) node $a1$;
    draw (-2.17,2.32) node $b1$;
    draw (-2.44,-2.18) node $a1$;
    draw (-2.13,0.07) node $T1$;
    draw (7.39,2.26) node $b2$;
    draw (12.1,-2.06) node $b2$;
    draw (10.43,-0.69) node $T2$;
    draw (11.98,2.38) node $a2$;
    draw (7.17,-2.24) node $a2$;

    endtikzpicture


    It produces :
    enter image description here










    share|improve this question
























      3












      3








      3


      0






      I would like to draw the following diagram :
      enter image description here
      I have used the following code generated in Geogebra, but it does not make the diagram which I want.



      begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm]
      draw (0,4)-- (4,0);
      draw (4,0)-- (0,-4);
      draw (0,-4)-- (-4,0);
      draw (-4,0)-- (0,4);
      draw (5.41,-0.03)-- (9.41,3.97);
      draw (9.41,3.97)-- (13.41,-0.03);
      draw (13.41,-0.03)-- (9.41,-4.03);
      draw (9.41,-4.03)-- (5.41,-0.03);
      draw [->] (2,2) -- (1.47,2.53);
      draw [->] (-1.59,2.41) -- (-2.26,1.74);
      draw [->] (2.5,-1.5) -- (1.81,-2.19);
      draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
      draw [->] (7.11,1.66) -- (7.67,2.22);
      draw [->] (11.29,-2.16) -- (11.85,-1.59);
      draw [->] (11.26,2.12) -- (11.89,1.5);
      draw [->] (6.9,-1.51) -- (7.98,-2.59);
      draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
      draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
      draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
      draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));

      draw (2.46,-2.36) node $b1$;
      draw (2.67,2.47) node $a1$;
      draw (-2.17,2.32) node $b1$;
      draw (-2.44,-2.18) node $a1$;
      draw (-2.13,0.07) node $T1$;
      draw (7.39,2.26) node $b2$;
      draw (12.1,-2.06) node $b2$;
      draw (10.43,-0.69) node $T2$;
      draw (11.98,2.38) node $a2$;
      draw (7.17,-2.24) node $a2$;

      endtikzpicture


      It produces :
      enter image description here










      share|improve this question














      I would like to draw the following diagram :
      enter image description here
      I have used the following code generated in Geogebra, but it does not make the diagram which I want.



      begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm]
      draw (0,4)-- (4,0);
      draw (4,0)-- (0,-4);
      draw (0,-4)-- (-4,0);
      draw (-4,0)-- (0,4);
      draw (5.41,-0.03)-- (9.41,3.97);
      draw (9.41,3.97)-- (13.41,-0.03);
      draw (13.41,-0.03)-- (9.41,-4.03);
      draw (9.41,-4.03)-- (5.41,-0.03);
      draw [->] (2,2) -- (1.47,2.53);
      draw [->] (-1.59,2.41) -- (-2.26,1.74);
      draw [->] (2.5,-1.5) -- (1.81,-2.19);
      draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
      draw [->] (7.11,1.66) -- (7.67,2.22);
      draw [->] (11.29,-2.16) -- (11.85,-1.59);
      draw [->] (11.26,2.12) -- (11.89,1.5);
      draw [->] (6.9,-1.51) -- (7.98,-2.59);
      draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
      draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
      draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
      draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));

      draw (2.46,-2.36) node $b1$;
      draw (2.67,2.47) node $a1$;
      draw (-2.17,2.32) node $b1$;
      draw (-2.44,-2.18) node $a1$;
      draw (-2.13,0.07) node $T1$;
      draw (7.39,2.26) node $b2$;
      draw (12.1,-2.06) node $b2$;
      draw (10.43,-0.69) node $T2$;
      draw (11.98,2.38) node $a2$;
      draw (7.17,-2.24) node $a2$;

      endtikzpicture


      It produces :
      enter image description here







      tikz-pgf diagrams






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 11 '18 at 9:01









      H.S.H.S.

      573




      573




















          2 Answers
          2






          active

          oldest

          votes


















          2














          To draw this curve, I used the operation Curve-To (see p 149 of manual 3.0.1a).



          draw [postaction=decorate](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);


          To place the arrow in the middle, I used the answer from @Caramdir TikZ: How to draw an arrow in the middle of the line?



          It is possible to simplify your code. I didn't do it so you could understand the changes made. But it is always possible to do so if you wish.
          Tori



          documentclassarticle
          usepackagetikz
          usetikzlibraryarrows.meta
          usetikzlibrarydecorations.markings
          begindocument


          begintikzpicture[line cap=round,line join=round,>=Triangle,scale=.7]
          draw (0,4)-- (4,0);
          draw (4,0)-- (0,-4);
          draw (0,-4)-- (-4,0);
          draw (-4,0)-- (0,4);
          draw (5.41,-0.03)-- (9.41,3.97);
          draw (9.41,3.97)-- (13.41,-0.03);
          draw (13.41,-0.03)-- (9.41,-4.03);
          draw (9.41,-4.03)-- (5.41,-0.03);
          draw [->] (2,2) -- (1.47,2.53);
          draw [->] (-1.59,2.41) -- (-2.26,1.74);
          draw [->] (2.5,-1.5) -- (1.81,-2.19);
          draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
          draw [->] (7.11,1.66) -- (7.67,2.22);
          draw [->] (11.29,-2.16) -- (11.85,-1.59);
          draw [->] (11.26,2.12) -- (11.89,1.5);
          draw [->] (6.9,-1.51) -- (7.98,-2.59);

          % arrow in the middle from https://tex.stackexchange.com/a/3172/138900
          beginscope[decoration=markings,mark=at position 0.5 with arrow>]
          draw [postaction=decorate,fill=gray!50](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);
          draw [postaction=decorate,fill=gray!50](5.41,-0.03)..controls +(4,-2.5) and +(4,2.5).. (5.41,-0.03);
          endscope

          draw (2.46,-2.36) node $b1$;
          draw (2.67,2.47) node $a1$;
          draw (-2.17,2.32) node $b1$;
          draw (-2.44,-2.18) node $a1$;
          draw (-2.13,0.07) node $T1$;
          draw (7.39,2.26) node $b2$;
          draw (12.1,-2.06) node $b2$;
          draw (10.43,-0.69) node $T2$;
          draw (11.98,2.38) node $a2$;
          draw (7.17,-2.24) node $a2$;

          endtikzpicture
          enddocument





          share|improve this answer
































            2














            An alternative with the same idea as @AndréC answer but without scope and with to instead of controls



            documentclassbook
            usepackagetikz
            usetikzlibraryarrows,decorations.markings

            begindocument
            begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm, decoration=markings, mark=at position 0.52 with arrow>]
            draw (0,4)-- (4,0);
            draw (4,0)-- (0,-4);
            draw (0,-4)-- (-4,0);
            draw (-4,0)-- (0,4);
            draw (5.41,-0.03)-- (9.41,3.97);
            draw (9.41,3.97)-- (13.41,-0.03);
            draw (13.41,-0.03)-- (9.41,-4.03);
            draw (9.41,-4.03)-- (5.41,-0.03);
            draw [->] (2,2) -- (1.47,2.53);
            draw [->] (-1.59,2.41) -- (-2.26,1.74);
            draw [->] (2.5,-1.5) -- (1.81,-2.19);
            draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
            draw [->] (7.11,1.66) -- (7.67,2.22);
            draw [->] (11.29,-2.16) -- (11.85,-1.59);
            draw [->] (11.26,2.12) -- (11.89,1.5);
            draw [->] (6.9,-1.51) -- (7.98,-2.59);
            %draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
            %draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
            %draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
            %draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));
            draw[fill=gray,,postaction=decorate] (4,0) to[in=270, out=225] (1,0) to[in=135, out=90] (4,0);
            draw[fill=gray,,postaction=decorate] (5.42,0) to[in=270, out=315] (8.42,0) to[in=45, out=90] (5.42,0);

            draw (2.46,-2.36) node $b1$;
            draw (2.67,2.47) node $a1$;
            draw (-2.17,2.32) node $b1$;
            draw (-2.44,-2.18) node $a1$;
            draw (-2.13,0.07) node $T1$;
            draw (7.39,2.26) node $b2$;
            draw (12.1,-2.06) node $b2$;
            draw (10.43,-0.69) node $T2$;
            draw (11.98,2.38) node $a2$;
            draw (7.17,-2.24) node $a2$;

            endtikzpicture
            enddocument


            enter image description here



            PS: Please upvote his answer instead of mine because he answered before me, but his answer became visible to me after I had already created the code... and so, I decided to add it as an alternative.






            share|improve this answer






















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "85"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459431%2fhow-to-draw-disjoint-tori-in-latex%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              To draw this curve, I used the operation Curve-To (see p 149 of manual 3.0.1a).



              draw [postaction=decorate](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);


              To place the arrow in the middle, I used the answer from @Caramdir TikZ: How to draw an arrow in the middle of the line?



              It is possible to simplify your code. I didn't do it so you could understand the changes made. But it is always possible to do so if you wish.
              Tori



              documentclassarticle
              usepackagetikz
              usetikzlibraryarrows.meta
              usetikzlibrarydecorations.markings
              begindocument


              begintikzpicture[line cap=round,line join=round,>=Triangle,scale=.7]
              draw (0,4)-- (4,0);
              draw (4,0)-- (0,-4);
              draw (0,-4)-- (-4,0);
              draw (-4,0)-- (0,4);
              draw (5.41,-0.03)-- (9.41,3.97);
              draw (9.41,3.97)-- (13.41,-0.03);
              draw (13.41,-0.03)-- (9.41,-4.03);
              draw (9.41,-4.03)-- (5.41,-0.03);
              draw [->] (2,2) -- (1.47,2.53);
              draw [->] (-1.59,2.41) -- (-2.26,1.74);
              draw [->] (2.5,-1.5) -- (1.81,-2.19);
              draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
              draw [->] (7.11,1.66) -- (7.67,2.22);
              draw [->] (11.29,-2.16) -- (11.85,-1.59);
              draw [->] (11.26,2.12) -- (11.89,1.5);
              draw [->] (6.9,-1.51) -- (7.98,-2.59);

              % arrow in the middle from https://tex.stackexchange.com/a/3172/138900
              beginscope[decoration=markings,mark=at position 0.5 with arrow>]
              draw [postaction=decorate,fill=gray!50](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);
              draw [postaction=decorate,fill=gray!50](5.41,-0.03)..controls +(4,-2.5) and +(4,2.5).. (5.41,-0.03);
              endscope

              draw (2.46,-2.36) node $b1$;
              draw (2.67,2.47) node $a1$;
              draw (-2.17,2.32) node $b1$;
              draw (-2.44,-2.18) node $a1$;
              draw (-2.13,0.07) node $T1$;
              draw (7.39,2.26) node $b2$;
              draw (12.1,-2.06) node $b2$;
              draw (10.43,-0.69) node $T2$;
              draw (11.98,2.38) node $a2$;
              draw (7.17,-2.24) node $a2$;

              endtikzpicture
              enddocument





              share|improve this answer





























                2














                To draw this curve, I used the operation Curve-To (see p 149 of manual 3.0.1a).



                draw [postaction=decorate](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);


                To place the arrow in the middle, I used the answer from @Caramdir TikZ: How to draw an arrow in the middle of the line?



                It is possible to simplify your code. I didn't do it so you could understand the changes made. But it is always possible to do so if you wish.
                Tori



                documentclassarticle
                usepackagetikz
                usetikzlibraryarrows.meta
                usetikzlibrarydecorations.markings
                begindocument


                begintikzpicture[line cap=round,line join=round,>=Triangle,scale=.7]
                draw (0,4)-- (4,0);
                draw (4,0)-- (0,-4);
                draw (0,-4)-- (-4,0);
                draw (-4,0)-- (0,4);
                draw (5.41,-0.03)-- (9.41,3.97);
                draw (9.41,3.97)-- (13.41,-0.03);
                draw (13.41,-0.03)-- (9.41,-4.03);
                draw (9.41,-4.03)-- (5.41,-0.03);
                draw [->] (2,2) -- (1.47,2.53);
                draw [->] (-1.59,2.41) -- (-2.26,1.74);
                draw [->] (2.5,-1.5) -- (1.81,-2.19);
                draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                draw [->] (7.11,1.66) -- (7.67,2.22);
                draw [->] (11.29,-2.16) -- (11.85,-1.59);
                draw [->] (11.26,2.12) -- (11.89,1.5);
                draw [->] (6.9,-1.51) -- (7.98,-2.59);

                % arrow in the middle from https://tex.stackexchange.com/a/3172/138900
                beginscope[decoration=markings,mark=at position 0.5 with arrow>]
                draw [postaction=decorate,fill=gray!50](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);
                draw [postaction=decorate,fill=gray!50](5.41,-0.03)..controls +(4,-2.5) and +(4,2.5).. (5.41,-0.03);
                endscope

                draw (2.46,-2.36) node $b1$;
                draw (2.67,2.47) node $a1$;
                draw (-2.17,2.32) node $b1$;
                draw (-2.44,-2.18) node $a1$;
                draw (-2.13,0.07) node $T1$;
                draw (7.39,2.26) node $b2$;
                draw (12.1,-2.06) node $b2$;
                draw (10.43,-0.69) node $T2$;
                draw (11.98,2.38) node $a2$;
                draw (7.17,-2.24) node $a2$;

                endtikzpicture
                enddocument





                share|improve this answer



























                  2












                  2








                  2







                  To draw this curve, I used the operation Curve-To (see p 149 of manual 3.0.1a).



                  draw [postaction=decorate](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);


                  To place the arrow in the middle, I used the answer from @Caramdir TikZ: How to draw an arrow in the middle of the line?



                  It is possible to simplify your code. I didn't do it so you could understand the changes made. But it is always possible to do so if you wish.
                  Tori



                  documentclassarticle
                  usepackagetikz
                  usetikzlibraryarrows.meta
                  usetikzlibrarydecorations.markings
                  begindocument


                  begintikzpicture[line cap=round,line join=round,>=Triangle,scale=.7]
                  draw (0,4)-- (4,0);
                  draw (4,0)-- (0,-4);
                  draw (0,-4)-- (-4,0);
                  draw (-4,0)-- (0,4);
                  draw (5.41,-0.03)-- (9.41,3.97);
                  draw (9.41,3.97)-- (13.41,-0.03);
                  draw (13.41,-0.03)-- (9.41,-4.03);
                  draw (9.41,-4.03)-- (5.41,-0.03);
                  draw [->] (2,2) -- (1.47,2.53);
                  draw [->] (-1.59,2.41) -- (-2.26,1.74);
                  draw [->] (2.5,-1.5) -- (1.81,-2.19);
                  draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                  draw [->] (7.11,1.66) -- (7.67,2.22);
                  draw [->] (11.29,-2.16) -- (11.85,-1.59);
                  draw [->] (11.26,2.12) -- (11.89,1.5);
                  draw [->] (6.9,-1.51) -- (7.98,-2.59);

                  % arrow in the middle from https://tex.stackexchange.com/a/3172/138900
                  beginscope[decoration=markings,mark=at position 0.5 with arrow>]
                  draw [postaction=decorate,fill=gray!50](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);
                  draw [postaction=decorate,fill=gray!50](5.41,-0.03)..controls +(4,-2.5) and +(4,2.5).. (5.41,-0.03);
                  endscope

                  draw (2.46,-2.36) node $b1$;
                  draw (2.67,2.47) node $a1$;
                  draw (-2.17,2.32) node $b1$;
                  draw (-2.44,-2.18) node $a1$;
                  draw (-2.13,0.07) node $T1$;
                  draw (7.39,2.26) node $b2$;
                  draw (12.1,-2.06) node $b2$;
                  draw (10.43,-0.69) node $T2$;
                  draw (11.98,2.38) node $a2$;
                  draw (7.17,-2.24) node $a2$;

                  endtikzpicture
                  enddocument





                  share|improve this answer















                  To draw this curve, I used the operation Curve-To (see p 149 of manual 3.0.1a).



                  draw [postaction=decorate](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);


                  To place the arrow in the middle, I used the answer from @Caramdir TikZ: How to draw an arrow in the middle of the line?



                  It is possible to simplify your code. I didn't do it so you could understand the changes made. But it is always possible to do so if you wish.
                  Tori



                  documentclassarticle
                  usepackagetikz
                  usetikzlibraryarrows.meta
                  usetikzlibrarydecorations.markings
                  begindocument


                  begintikzpicture[line cap=round,line join=round,>=Triangle,scale=.7]
                  draw (0,4)-- (4,0);
                  draw (4,0)-- (0,-4);
                  draw (0,-4)-- (-4,0);
                  draw (-4,0)-- (0,4);
                  draw (5.41,-0.03)-- (9.41,3.97);
                  draw (9.41,3.97)-- (13.41,-0.03);
                  draw (13.41,-0.03)-- (9.41,-4.03);
                  draw (9.41,-4.03)-- (5.41,-0.03);
                  draw [->] (2,2) -- (1.47,2.53);
                  draw [->] (-1.59,2.41) -- (-2.26,1.74);
                  draw [->] (2.5,-1.5) -- (1.81,-2.19);
                  draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                  draw [->] (7.11,1.66) -- (7.67,2.22);
                  draw [->] (11.29,-2.16) -- (11.85,-1.59);
                  draw [->] (11.26,2.12) -- (11.89,1.5);
                  draw [->] (6.9,-1.51) -- (7.98,-2.59);

                  % arrow in the middle from https://tex.stackexchange.com/a/3172/138900
                  beginscope[decoration=markings,mark=at position 0.5 with arrow>]
                  draw [postaction=decorate,fill=gray!50](4,0)..controls +(-4,-2.5) and +(-4,2.5).. (4,0);
                  draw [postaction=decorate,fill=gray!50](5.41,-0.03)..controls +(4,-2.5) and +(4,2.5).. (5.41,-0.03);
                  endscope

                  draw (2.46,-2.36) node $b1$;
                  draw (2.67,2.47) node $a1$;
                  draw (-2.17,2.32) node $b1$;
                  draw (-2.44,-2.18) node $a1$;
                  draw (-2.13,0.07) node $T1$;
                  draw (7.39,2.26) node $b2$;
                  draw (12.1,-2.06) node $b2$;
                  draw (10.43,-0.69) node $T2$;
                  draw (11.98,2.38) node $a2$;
                  draw (7.17,-2.24) node $a2$;

                  endtikzpicture
                  enddocument






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 11 '18 at 10:16

























                  answered Nov 11 '18 at 9:36









                  AndréCAndréC

                  8,78411447




                  8,78411447





















                      2














                      An alternative with the same idea as @AndréC answer but without scope and with to instead of controls



                      documentclassbook
                      usepackagetikz
                      usetikzlibraryarrows,decorations.markings

                      begindocument
                      begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm, decoration=markings, mark=at position 0.52 with arrow>]
                      draw (0,4)-- (4,0);
                      draw (4,0)-- (0,-4);
                      draw (0,-4)-- (-4,0);
                      draw (-4,0)-- (0,4);
                      draw (5.41,-0.03)-- (9.41,3.97);
                      draw (9.41,3.97)-- (13.41,-0.03);
                      draw (13.41,-0.03)-- (9.41,-4.03);
                      draw (9.41,-4.03)-- (5.41,-0.03);
                      draw [->] (2,2) -- (1.47,2.53);
                      draw [->] (-1.59,2.41) -- (-2.26,1.74);
                      draw [->] (2.5,-1.5) -- (1.81,-2.19);
                      draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                      draw [->] (7.11,1.66) -- (7.67,2.22);
                      draw [->] (11.29,-2.16) -- (11.85,-1.59);
                      draw [->] (11.26,2.12) -- (11.89,1.5);
                      draw [->] (6.9,-1.51) -- (7.98,-2.59);
                      %draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
                      %draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
                      %draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
                      %draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));
                      draw[fill=gray,,postaction=decorate] (4,0) to[in=270, out=225] (1,0) to[in=135, out=90] (4,0);
                      draw[fill=gray,,postaction=decorate] (5.42,0) to[in=270, out=315] (8.42,0) to[in=45, out=90] (5.42,0);

                      draw (2.46,-2.36) node $b1$;
                      draw (2.67,2.47) node $a1$;
                      draw (-2.17,2.32) node $b1$;
                      draw (-2.44,-2.18) node $a1$;
                      draw (-2.13,0.07) node $T1$;
                      draw (7.39,2.26) node $b2$;
                      draw (12.1,-2.06) node $b2$;
                      draw (10.43,-0.69) node $T2$;
                      draw (11.98,2.38) node $a2$;
                      draw (7.17,-2.24) node $a2$;

                      endtikzpicture
                      enddocument


                      enter image description here



                      PS: Please upvote his answer instead of mine because he answered before me, but his answer became visible to me after I had already created the code... and so, I decided to add it as an alternative.






                      share|improve this answer



























                        2














                        An alternative with the same idea as @AndréC answer but without scope and with to instead of controls



                        documentclassbook
                        usepackagetikz
                        usetikzlibraryarrows,decorations.markings

                        begindocument
                        begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm, decoration=markings, mark=at position 0.52 with arrow>]
                        draw (0,4)-- (4,0);
                        draw (4,0)-- (0,-4);
                        draw (0,-4)-- (-4,0);
                        draw (-4,0)-- (0,4);
                        draw (5.41,-0.03)-- (9.41,3.97);
                        draw (9.41,3.97)-- (13.41,-0.03);
                        draw (13.41,-0.03)-- (9.41,-4.03);
                        draw (9.41,-4.03)-- (5.41,-0.03);
                        draw [->] (2,2) -- (1.47,2.53);
                        draw [->] (-1.59,2.41) -- (-2.26,1.74);
                        draw [->] (2.5,-1.5) -- (1.81,-2.19);
                        draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                        draw [->] (7.11,1.66) -- (7.67,2.22);
                        draw [->] (11.29,-2.16) -- (11.85,-1.59);
                        draw [->] (11.26,2.12) -- (11.89,1.5);
                        draw [->] (6.9,-1.51) -- (7.98,-2.59);
                        %draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
                        %draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
                        %draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
                        %draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));
                        draw[fill=gray,,postaction=decorate] (4,0) to[in=270, out=225] (1,0) to[in=135, out=90] (4,0);
                        draw[fill=gray,,postaction=decorate] (5.42,0) to[in=270, out=315] (8.42,0) to[in=45, out=90] (5.42,0);

                        draw (2.46,-2.36) node $b1$;
                        draw (2.67,2.47) node $a1$;
                        draw (-2.17,2.32) node $b1$;
                        draw (-2.44,-2.18) node $a1$;
                        draw (-2.13,0.07) node $T1$;
                        draw (7.39,2.26) node $b2$;
                        draw (12.1,-2.06) node $b2$;
                        draw (10.43,-0.69) node $T2$;
                        draw (11.98,2.38) node $a2$;
                        draw (7.17,-2.24) node $a2$;

                        endtikzpicture
                        enddocument


                        enter image description here



                        PS: Please upvote his answer instead of mine because he answered before me, but his answer became visible to me after I had already created the code... and so, I decided to add it as an alternative.






                        share|improve this answer

























                          2












                          2








                          2







                          An alternative with the same idea as @AndréC answer but without scope and with to instead of controls



                          documentclassbook
                          usepackagetikz
                          usetikzlibraryarrows,decorations.markings

                          begindocument
                          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm, decoration=markings, mark=at position 0.52 with arrow>]
                          draw (0,4)-- (4,0);
                          draw (4,0)-- (0,-4);
                          draw (0,-4)-- (-4,0);
                          draw (-4,0)-- (0,4);
                          draw (5.41,-0.03)-- (9.41,3.97);
                          draw (9.41,3.97)-- (13.41,-0.03);
                          draw (13.41,-0.03)-- (9.41,-4.03);
                          draw (9.41,-4.03)-- (5.41,-0.03);
                          draw [->] (2,2) -- (1.47,2.53);
                          draw [->] (-1.59,2.41) -- (-2.26,1.74);
                          draw [->] (2.5,-1.5) -- (1.81,-2.19);
                          draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                          draw [->] (7.11,1.66) -- (7.67,2.22);
                          draw [->] (11.29,-2.16) -- (11.85,-1.59);
                          draw [->] (11.26,2.12) -- (11.89,1.5);
                          draw [->] (6.9,-1.51) -- (7.98,-2.59);
                          %draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
                          %draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
                          %draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
                          %draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));
                          draw[fill=gray,,postaction=decorate] (4,0) to[in=270, out=225] (1,0) to[in=135, out=90] (4,0);
                          draw[fill=gray,,postaction=decorate] (5.42,0) to[in=270, out=315] (8.42,0) to[in=45, out=90] (5.42,0);

                          draw (2.46,-2.36) node $b1$;
                          draw (2.67,2.47) node $a1$;
                          draw (-2.17,2.32) node $b1$;
                          draw (-2.44,-2.18) node $a1$;
                          draw (-2.13,0.07) node $T1$;
                          draw (7.39,2.26) node $b2$;
                          draw (12.1,-2.06) node $b2$;
                          draw (10.43,-0.69) node $T2$;
                          draw (11.98,2.38) node $a2$;
                          draw (7.17,-2.24) node $a2$;

                          endtikzpicture
                          enddocument


                          enter image description here



                          PS: Please upvote his answer instead of mine because he answered before me, but his answer became visible to me after I had already created the code... and so, I decided to add it as an alternative.






                          share|improve this answer













                          An alternative with the same idea as @AndréC answer but without scope and with to instead of controls



                          documentclassbook
                          usepackagetikz
                          usetikzlibraryarrows,decorations.markings

                          begindocument
                          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=0.7cm,y=0.7cm, decoration=markings, mark=at position 0.52 with arrow>]
                          draw (0,4)-- (4,0);
                          draw (4,0)-- (0,-4);
                          draw (0,-4)-- (-4,0);
                          draw (-4,0)-- (0,4);
                          draw (5.41,-0.03)-- (9.41,3.97);
                          draw (9.41,3.97)-- (13.41,-0.03);
                          draw (13.41,-0.03)-- (9.41,-4.03);
                          draw (9.41,-4.03)-- (5.41,-0.03);
                          draw [->] (2,2) -- (1.47,2.53);
                          draw [->] (-1.59,2.41) -- (-2.26,1.74);
                          draw [->] (2.5,-1.5) -- (1.81,-2.19);
                          draw [->] (-1.55,-2.45) -- (-2.34,-1.66);
                          draw [->] (7.11,1.66) -- (7.67,2.22);
                          draw [->] (11.29,-2.16) -- (11.85,-1.59);
                          draw [->] (11.26,2.12) -- (11.89,1.5);
                          draw [->] (6.9,-1.51) -- (7.98,-2.59);
                          %draw [shift=(2.18,3.21)] plot[domain=4.22:5.23,variable=t](1*3.69*cos(t r)+0*3.69*sin(t r),0*3.69*cos(t r)+1*3.69*sin(t r));
                          %draw [shift=(2.26,-2.4)] plot[domain=0.94:2.23,variable=t](1*2.97*cos(t r)+0*2.97*sin(t r),0*2.97*cos(t r)+1*2.97*sin(t r));
                          %draw [shift=(7.17,-1.78)] plot[domain=0.81:2.36,variable=t](1*2.48*cos(t r)+0*2.48*sin(t r),0*2.48*cos(t r)+1*2.48*sin(t r));
                          %draw [shift=(7.12,2.08)] plot[domain=4.03:5.42,variable=t](1*2.71*cos(t r)+0*2.71*sin(t r),0*2.71*cos(t r)+1*2.71*sin(t r));
                          draw[fill=gray,,postaction=decorate] (4,0) to[in=270, out=225] (1,0) to[in=135, out=90] (4,0);
                          draw[fill=gray,,postaction=decorate] (5.42,0) to[in=270, out=315] (8.42,0) to[in=45, out=90] (5.42,0);

                          draw (2.46,-2.36) node $b1$;
                          draw (2.67,2.47) node $a1$;
                          draw (-2.17,2.32) node $b1$;
                          draw (-2.44,-2.18) node $a1$;
                          draw (-2.13,0.07) node $T1$;
                          draw (7.39,2.26) node $b2$;
                          draw (12.1,-2.06) node $b2$;
                          draw (10.43,-0.69) node $T2$;
                          draw (11.98,2.38) node $a2$;
                          draw (7.17,-2.24) node $a2$;

                          endtikzpicture
                          enddocument


                          enter image description here



                          PS: Please upvote his answer instead of mine because he answered before me, but his answer became visible to me after I had already created the code... and so, I decided to add it as an alternative.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 11 '18 at 9:52









                          koleygrkoleygr

                          11.2k11038




                          11.2k11038



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459431%2fhow-to-draw-disjoint-tori-in-latex%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

                              Crossroads (UK TV series)

                              ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế