Drawing a topological “handle” with TikzDrawing circular arrows in tikz to represent turns in a T-intersectionTikz: Once punctured torus?Decoration of (relative) segments of Bézier curvesDrawing Torus with semi-dashed line on itRotate a node but not its content: the case of the ellipse decorationHow to draw an elliptical arc in TikZ given only opposite extreme points (vertices) of the ellipse?TikZ scaling graphic and adjust node position and keep font sizeDraw edge on arcNumerical conditional within tikz keys?Tikz: Error “dimension too large” when decorating arcTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themProblems with nested TikZpicturesTikz: positionning a beginscope…endscope relatively to the left of another block

Multi tool use
Multi tool use

Does "Dominei" mean something?

What will be the benefits of Brexit?

What is the opposite of 'gravitas'?

Resetting two CD4017 counters simultaneously, only one resets

Can I rely on these GitHub repository files?

Why does this part of the Space Shuttle launch pad seem to be floating in air?

Meta programming: Declare a new struct on the fly

How do I rename a LINUX host without needing to reboot for the rename to take effect?

Did US corporations pay demonstrators in the German demonstrations against article 13?

How can a jailer prevent the Forge Cleric's Artisan's Blessing from being used?

How to prevent YouTube from showing already watched videos?

Can I create an upright 7-foot × 5-foot wall with the Minor Illusion spell?

Can the harmonic series explain the origin of the major scale?

Can somebody explain Brexit in a few child-proof sentences?

Greatest common substring

Could solar power be utilized and substitute coal in the 19th century?

Superhero words!

What is the oldest known work of fiction?

Who must act to prevent Brexit on March 29th?

Visiting the UK as unmarried couple

A workplace installs custom certificates on personal devices, can this be used to decrypt HTTPS traffic?

Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)

Is there enough fresh water in the world to eradicate the drinking water crisis?

Can I use my Chinese passport to enter China after I acquired another citizenship?



Drawing a topological “handle” with Tikz


Drawing circular arrows in tikz to represent turns in a T-intersectionTikz: Once punctured torus?Decoration of (relative) segments of Bézier curvesDrawing Torus with semi-dashed line on itRotate a node but not its content: the case of the ellipse decorationHow to draw an elliptical arc in TikZ given only opposite extreme points (vertices) of the ellipse?TikZ scaling graphic and adjust node position and keep font sizeDraw edge on arcNumerical conditional within tikz keys?Tikz: Error “dimension too large” when decorating arcTikZ: Drawing an arc from an intersection to an intersectionLine up nested tikz enviroments or how to get rid of themProblems with nested TikZpicturesTikz: positionning a beginscope…endscope relatively to the left of another block













4















I'm trying to do the following drawing in Tikz:





I almost finished the leftmost picture:





begintikzpicture
fill[blue!20] (7.5,0) ellipse (1 and .75);
draw (7.5,0) ellipse (1 and .75);
beginscope
clip (7.5,-.9) ellipse (1 and 1.25);
draw(7.5,1.1) ellipse (1 and 1.25);
clip (7.5,1.1) ellipse (1 and 1.25);
draw (7.5,-1.1) ellipse (1 and 1.25);
fill[white] (7.5,-1.1) ellipse (1 and 1.25);
endscope
draw (7.5,0) ellipse (0.8 and .47);
draw (7.5,.47) node[scale=0.8] $<$ node[above] $a$;
node (a) at (7.61,-.142894);
node (b) at (8,-.649519);
node (c) at ($(a)!0.5!(b)$) ;
beginscope[shift=(c),x=(a), scale=0.7]
draw (1,0) arc (0:180:1 and 0.3);
draw[dashed] (-1,0) arc (180:360:1 and 0.3);
endscope
draw (7.942,-0.555) node[scale=0.8,rotate=-85] $<$;
draw (7.67,-0.60) node $b$;
endtikzpicture


However I failed to do the "bubble" in the first drawing and to the second one. I appreciate any help.



The closest question I found here was this one: Tikz: Once punctured torus?



However, the answers there don't solve most of my problems.










share|improve this question


























    4















    I'm trying to do the following drawing in Tikz:





    I almost finished the leftmost picture:





    begintikzpicture
    fill[blue!20] (7.5,0) ellipse (1 and .75);
    draw (7.5,0) ellipse (1 and .75);
    beginscope
    clip (7.5,-.9) ellipse (1 and 1.25);
    draw(7.5,1.1) ellipse (1 and 1.25);
    clip (7.5,1.1) ellipse (1 and 1.25);
    draw (7.5,-1.1) ellipse (1 and 1.25);
    fill[white] (7.5,-1.1) ellipse (1 and 1.25);
    endscope
    draw (7.5,0) ellipse (0.8 and .47);
    draw (7.5,.47) node[scale=0.8] $<$ node[above] $a$;
    node (a) at (7.61,-.142894);
    node (b) at (8,-.649519);
    node (c) at ($(a)!0.5!(b)$) ;
    beginscope[shift=(c),x=(a), scale=0.7]
    draw (1,0) arc (0:180:1 and 0.3);
    draw[dashed] (-1,0) arc (180:360:1 and 0.3);
    endscope
    draw (7.942,-0.555) node[scale=0.8,rotate=-85] $<$;
    draw (7.67,-0.60) node $b$;
    endtikzpicture


    However I failed to do the "bubble" in the first drawing and to the second one. I appreciate any help.



    The closest question I found here was this one: Tikz: Once punctured torus?



    However, the answers there don't solve most of my problems.










    share|improve this question
























      4












      4








      4


      1






      I'm trying to do the following drawing in Tikz:





      I almost finished the leftmost picture:





      begintikzpicture
      fill[blue!20] (7.5,0) ellipse (1 and .75);
      draw (7.5,0) ellipse (1 and .75);
      beginscope
      clip (7.5,-.9) ellipse (1 and 1.25);
      draw(7.5,1.1) ellipse (1 and 1.25);
      clip (7.5,1.1) ellipse (1 and 1.25);
      draw (7.5,-1.1) ellipse (1 and 1.25);
      fill[white] (7.5,-1.1) ellipse (1 and 1.25);
      endscope
      draw (7.5,0) ellipse (0.8 and .47);
      draw (7.5,.47) node[scale=0.8] $<$ node[above] $a$;
      node (a) at (7.61,-.142894);
      node (b) at (8,-.649519);
      node (c) at ($(a)!0.5!(b)$) ;
      beginscope[shift=(c),x=(a), scale=0.7]
      draw (1,0) arc (0:180:1 and 0.3);
      draw[dashed] (-1,0) arc (180:360:1 and 0.3);
      endscope
      draw (7.942,-0.555) node[scale=0.8,rotate=-85] $<$;
      draw (7.67,-0.60) node $b$;
      endtikzpicture


      However I failed to do the "bubble" in the first drawing and to the second one. I appreciate any help.



      The closest question I found here was this one: Tikz: Once punctured torus?



      However, the answers there don't solve most of my problems.










      share|improve this question














      I'm trying to do the following drawing in Tikz:





      I almost finished the leftmost picture:





      begintikzpicture
      fill[blue!20] (7.5,0) ellipse (1 and .75);
      draw (7.5,0) ellipse (1 and .75);
      beginscope
      clip (7.5,-.9) ellipse (1 and 1.25);
      draw(7.5,1.1) ellipse (1 and 1.25);
      clip (7.5,1.1) ellipse (1 and 1.25);
      draw (7.5,-1.1) ellipse (1 and 1.25);
      fill[white] (7.5,-1.1) ellipse (1 and 1.25);
      endscope
      draw (7.5,0) ellipse (0.8 and .47);
      draw (7.5,.47) node[scale=0.8] $<$ node[above] $a$;
      node (a) at (7.61,-.142894);
      node (b) at (8,-.649519);
      node (c) at ($(a)!0.5!(b)$) ;
      beginscope[shift=(c),x=(a), scale=0.7]
      draw (1,0) arc (0:180:1 and 0.3);
      draw[dashed] (-1,0) arc (180:360:1 and 0.3);
      endscope
      draw (7.942,-0.555) node[scale=0.8,rotate=-85] $<$;
      draw (7.67,-0.60) node $b$;
      endtikzpicture


      However I failed to do the "bubble" in the first drawing and to the second one. I appreciate any help.



      The closest question I found here was this one: Tikz: Once punctured torus?



      However, the answers there don't solve most of my problems.







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Gabriel RibeiroGabriel Ribeiro

      35519




      35519




















          2 Answers
          2






          active

          oldest

          votes


















          11














          If you really intend to play with these tori, you may eventually want to switch to 3d coordinates, where it is possible to find out whether a coordinate is on the visible or hidden patch.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords600
          tikzsetdeclare function=torusx(u,v,R,r)=cos(u)*(R + r*cos(v));
          torusy(u,v,R,r)=(R + r*cos(v))*sin(u);
          torusz(u,v,R,r)=r*sin(v);
          vcrit1(u,th)=atan(tan(th)*sin(u));% first critical v value
          vcrit2(u,th)=180+atan(tan(th)*sin(u));% second critical v value
          disc(th,R,r)=((pow(r,2)-pow(R,2))*pow(cot(th),2)+%
          pow(r,2)*(2+pow(tan(th),2)))/pow(R,2);% discriminant
          umax(th,R,r)=ifthenelse(disc(th,R,r)>0,asin(sqrt(abs(disc(th,R,r)))),0);


          begintikzpicture[tdplot_main_coords]
          pgfmathsetmacroR4
          pgfmathsetmacror1.5
          draw[thick,fill=gray,even odd rule,fill opacity=0.2] plot[variable=x,domain=0:360,smooth,samples=71]
          (torusx(x,vcrit1(x,tdplotmaintheta),R,r),
          torusy(x,vcrit1(x,tdplotmaintheta),R,r),
          torusz(x,vcrit1(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r):-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=umax(tdplotmaintheta,R,r):180-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          draw[thick] plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r)/2:-umax(tdplotmaintheta,R,r)/2,smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          foreach X in 300
          draw[thick,dashed]
          plot[smooth,variable=x,domain=360+vcrit1(X,tdplotmaintheta):vcrit2(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick]
          plot[smooth,variable=x,domain=vcrit2(X,tdplotmaintheta):vcrit1(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick,-latex]
          plot[smooth,variable=x,domain=vcrit1(X,tdplotmaintheta):90,samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));

          draw[thick,-latex] plot[smooth,variable=x,domain=00:360,samples=71]
          (torusx(x,90,R,r),
          torusy(x,90,R,r),
          torusz(x,90,R,r));
          beginscope[declare function=myu(x)=sin(2*x)*sin(x);
          myv(x)=sin(2*x)*cos(x);]
          draw[thick,fill=white] plot[smooth,variable=x,domain=00:90,samples=71]
          (torusx(-60+45*myu(x),90-45*myv(x),R,r),
          torusy(-60+45*myu(x),90-45*myv(x),R,r),
          torusz(-60+45*myu(x),90-45*myv(x),R,r));
          endscope
          endtikzpicture
          enddocument


          enter image description here



          If you want a cartoon, consider e.g.



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibraryarrows.meta,bending,decorations.markings,intersections
          % https://tex.stackexchange.com/a/430239/121799
          tikzset% inspired by https://tex.stackexchange.com/a/316050/121799
          arc arrow/.style args=%
          to pos #1 with length #2
          decoration=
          markings,
          mark=at position 0 with pgfextra%
          pgfmathsetmacrotmpArrowTime#2/(pgfdecoratedpathlength)
          xdeftmpArrowTimetmpArrowTime,
          mark=at position #1-tmpArrowTime with coordinate(@1);,
          mark=at position #1-2*tmpArrowTime/3 with coordinate(@2);,
          mark=at position #1-tmpArrowTime/3 with coordinate(@3);,
          mark=at position #1 with coordinate(@4);
          draw[-Stealth[length=#2,bend]]
          (@1) .. controls (@2) and (@3) .. (@4);,
          ,
          postaction=decorate,
          ,bent arrow/.style=arc arrow=to pos #1 with length 2mm,


          begindocument
          begintikzpicture[scale=4]
          beginscope[local bounding box=left]
          draw[fill=blue!20,even odd rule] (0,0) ellipse (1 and .75)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.25] (xt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw[bent arrow=0.2,thick,name path=b] (-65:1 and .75) to[out=40,in=10]
          node[pos=0.2,right]$b$ (xt);
          draw[dashed] (xt) to[out=-170,in=-140] (-65:1 and .75);
          draw[bent arrow=0.98,thick,name path=a] (0.8,0.05) arc(0:360:0.8 and .5)
          node[pos=0.2,below]$ell$ node[pos=0.98,right]$a$;
          draw[name intersections=of=a and b,by=i,fill=white] (i)
          to[out=45,in=-45] ++ (0.2,0.4) to[out=135,in=45](i);
          endscope
          %
          beginscope[local bounding box=right,xshift=2.5cm]
          draw[fill=blue!20,even odd rule]
          (-0.7,-1) to[out=90,in=-90] (-1,0) arc(180:0:1 and .75)
          to[out=-90,in=90] coordinate[pos=0.7] (ys) (0.7,-1) arc(0:180:0.7 and 0.12) coordinate[pos=0.5] (p)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.5] (yt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw (0.7,-1) arc(0:-180:0.7 and 0.12);
          draw[bent arrow=0.5,thick] (p) to[out=70,in=-120] (-20:0.8 and .5)
          arc(-20:200:0.8 and .5) node[pos=0.5,below]$a$ to[out=-60,in=110] cycle;
          draw[bent arrow=0.5,thick] (p) to[out=80,in=180] node[pos=0.5,right]$b$ (yt);
          draw[dashed] (yt) to[out=0,in=70] (ys);
          draw[thick] (ys) to[out=-110,in=20] (p);
          endscope
          path (left) -- (right) node[midway,scale=2]$simeq$;
          endtikzpicture
          enddocument


          enter image description here



          Unlike in the above picture, you cannot adjust the view angle.






          share|improve this answer

























          • Is it also easier to do the second picture with this method?

            – Gabriel Ribeiro
            yesterday






          • 1





            @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

            – marmot
            yesterday






          • 1





            @GabrielRibeiro I also added cartoons.

            – marmot
            yesterday






          • 1





            This is beautiful! Thank you a lot

            – Gabriel Ribeiro
            yesterday


















          4














          Using the tqft package:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/481212/86
          usepackagetikz
          usetikzlibrary
          tqft,
          decorations.markings,
          arrows.meta,
          hobby,
          calc


          begindocument

          begintikzpicture[use Hobby shortcut]
          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=top
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 0,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=bottom,
          at=(top-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          ,
          postaction=decorate
          ]
          (bottom-between first incoming and last incoming) to[out=45,in=-45] node[pos=.25,right] (b) coordinate[pos=.5] (a) (bottom-between incoming 1 and 2);
          draw[dashed] (bottom-between first incoming and last incoming) to[out=135,in=-135] (bottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ] ([closed]$(bottom-between first incoming and last incoming)!.5!(bottom-between incoming 1 and 2)$) .. (bottom-incoming boundary 2.north) .. ($(top-between first and last outgoing)!.5!(top-between outgoing 1 and 2)$) .. (bottom-incoming boundary 1.north);
          draw[fill=white] ([out angle=30]a) .. ++(1,.5) .. ++(.5,.6) .. ++(-.25,0) .. ([in angle=30]a);

          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=secondtop,
          at=(7,0)
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 1,
          offset=.5,
          cobordism edge/.style=draw,
          every outgoing boundary component/.style=transform shape,draw,
          fill=gray!50,
          name=secondbottom,
          at=(secondtop-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .5 with arrowLatex,
          mark=at position .5 with node[right] (b);,
          ,
          postaction=decorate
          ]
          (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between incoming 1 and 2);
          draw (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between last incoming and last outgoing);
          draw[dashed] (secondbottom-between last incoming and last outgoing) to[out=45,in=0] (secondbottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ]
          ([out angle=90]secondbottom-outgoing boundary 1.north) .. (secondbottom-incoming boundary 2.north) .. ($(secondtop-between first and last outgoing)!.5!(secondtop-between outgoing 1 and 2)$) .. (secondbottom-incoming boundary 1.north) .. ([in angle=90]secondbottom-outgoing boundary 1.north);

          node at ($(top-outgoing boundary 2.east)!.5!(secondtop-outgoing boundary 1.west)$) (simeq);
          endtikzpicture
          enddocument


          Homotopy equivalence of tori






          share|improve this answer























          • That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

            – marmot
            6 hours ago












          • documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

            – marmot
            6 hours ago










          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%2f481212%2fdrawing-a-topological-handle-with-tikz%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









          11














          If you really intend to play with these tori, you may eventually want to switch to 3d coordinates, where it is possible to find out whether a coordinate is on the visible or hidden patch.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords600
          tikzsetdeclare function=torusx(u,v,R,r)=cos(u)*(R + r*cos(v));
          torusy(u,v,R,r)=(R + r*cos(v))*sin(u);
          torusz(u,v,R,r)=r*sin(v);
          vcrit1(u,th)=atan(tan(th)*sin(u));% first critical v value
          vcrit2(u,th)=180+atan(tan(th)*sin(u));% second critical v value
          disc(th,R,r)=((pow(r,2)-pow(R,2))*pow(cot(th),2)+%
          pow(r,2)*(2+pow(tan(th),2)))/pow(R,2);% discriminant
          umax(th,R,r)=ifthenelse(disc(th,R,r)>0,asin(sqrt(abs(disc(th,R,r)))),0);


          begintikzpicture[tdplot_main_coords]
          pgfmathsetmacroR4
          pgfmathsetmacror1.5
          draw[thick,fill=gray,even odd rule,fill opacity=0.2] plot[variable=x,domain=0:360,smooth,samples=71]
          (torusx(x,vcrit1(x,tdplotmaintheta),R,r),
          torusy(x,vcrit1(x,tdplotmaintheta),R,r),
          torusz(x,vcrit1(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r):-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=umax(tdplotmaintheta,R,r):180-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          draw[thick] plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r)/2:-umax(tdplotmaintheta,R,r)/2,smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          foreach X in 300
          draw[thick,dashed]
          plot[smooth,variable=x,domain=360+vcrit1(X,tdplotmaintheta):vcrit2(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick]
          plot[smooth,variable=x,domain=vcrit2(X,tdplotmaintheta):vcrit1(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick,-latex]
          plot[smooth,variable=x,domain=vcrit1(X,tdplotmaintheta):90,samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));

          draw[thick,-latex] plot[smooth,variable=x,domain=00:360,samples=71]
          (torusx(x,90,R,r),
          torusy(x,90,R,r),
          torusz(x,90,R,r));
          beginscope[declare function=myu(x)=sin(2*x)*sin(x);
          myv(x)=sin(2*x)*cos(x);]
          draw[thick,fill=white] plot[smooth,variable=x,domain=00:90,samples=71]
          (torusx(-60+45*myu(x),90-45*myv(x),R,r),
          torusy(-60+45*myu(x),90-45*myv(x),R,r),
          torusz(-60+45*myu(x),90-45*myv(x),R,r));
          endscope
          endtikzpicture
          enddocument


          enter image description here



          If you want a cartoon, consider e.g.



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibraryarrows.meta,bending,decorations.markings,intersections
          % https://tex.stackexchange.com/a/430239/121799
          tikzset% inspired by https://tex.stackexchange.com/a/316050/121799
          arc arrow/.style args=%
          to pos #1 with length #2
          decoration=
          markings,
          mark=at position 0 with pgfextra%
          pgfmathsetmacrotmpArrowTime#2/(pgfdecoratedpathlength)
          xdeftmpArrowTimetmpArrowTime,
          mark=at position #1-tmpArrowTime with coordinate(@1);,
          mark=at position #1-2*tmpArrowTime/3 with coordinate(@2);,
          mark=at position #1-tmpArrowTime/3 with coordinate(@3);,
          mark=at position #1 with coordinate(@4);
          draw[-Stealth[length=#2,bend]]
          (@1) .. controls (@2) and (@3) .. (@4);,
          ,
          postaction=decorate,
          ,bent arrow/.style=arc arrow=to pos #1 with length 2mm,


          begindocument
          begintikzpicture[scale=4]
          beginscope[local bounding box=left]
          draw[fill=blue!20,even odd rule] (0,0) ellipse (1 and .75)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.25] (xt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw[bent arrow=0.2,thick,name path=b] (-65:1 and .75) to[out=40,in=10]
          node[pos=0.2,right]$b$ (xt);
          draw[dashed] (xt) to[out=-170,in=-140] (-65:1 and .75);
          draw[bent arrow=0.98,thick,name path=a] (0.8,0.05) arc(0:360:0.8 and .5)
          node[pos=0.2,below]$ell$ node[pos=0.98,right]$a$;
          draw[name intersections=of=a and b,by=i,fill=white] (i)
          to[out=45,in=-45] ++ (0.2,0.4) to[out=135,in=45](i);
          endscope
          %
          beginscope[local bounding box=right,xshift=2.5cm]
          draw[fill=blue!20,even odd rule]
          (-0.7,-1) to[out=90,in=-90] (-1,0) arc(180:0:1 and .75)
          to[out=-90,in=90] coordinate[pos=0.7] (ys) (0.7,-1) arc(0:180:0.7 and 0.12) coordinate[pos=0.5] (p)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.5] (yt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw (0.7,-1) arc(0:-180:0.7 and 0.12);
          draw[bent arrow=0.5,thick] (p) to[out=70,in=-120] (-20:0.8 and .5)
          arc(-20:200:0.8 and .5) node[pos=0.5,below]$a$ to[out=-60,in=110] cycle;
          draw[bent arrow=0.5,thick] (p) to[out=80,in=180] node[pos=0.5,right]$b$ (yt);
          draw[dashed] (yt) to[out=0,in=70] (ys);
          draw[thick] (ys) to[out=-110,in=20] (p);
          endscope
          path (left) -- (right) node[midway,scale=2]$simeq$;
          endtikzpicture
          enddocument


          enter image description here



          Unlike in the above picture, you cannot adjust the view angle.






          share|improve this answer

























          • Is it also easier to do the second picture with this method?

            – Gabriel Ribeiro
            yesterday






          • 1





            @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

            – marmot
            yesterday






          • 1





            @GabrielRibeiro I also added cartoons.

            – marmot
            yesterday






          • 1





            This is beautiful! Thank you a lot

            – Gabriel Ribeiro
            yesterday















          11














          If you really intend to play with these tori, you may eventually want to switch to 3d coordinates, where it is possible to find out whether a coordinate is on the visible or hidden patch.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords600
          tikzsetdeclare function=torusx(u,v,R,r)=cos(u)*(R + r*cos(v));
          torusy(u,v,R,r)=(R + r*cos(v))*sin(u);
          torusz(u,v,R,r)=r*sin(v);
          vcrit1(u,th)=atan(tan(th)*sin(u));% first critical v value
          vcrit2(u,th)=180+atan(tan(th)*sin(u));% second critical v value
          disc(th,R,r)=((pow(r,2)-pow(R,2))*pow(cot(th),2)+%
          pow(r,2)*(2+pow(tan(th),2)))/pow(R,2);% discriminant
          umax(th,R,r)=ifthenelse(disc(th,R,r)>0,asin(sqrt(abs(disc(th,R,r)))),0);


          begintikzpicture[tdplot_main_coords]
          pgfmathsetmacroR4
          pgfmathsetmacror1.5
          draw[thick,fill=gray,even odd rule,fill opacity=0.2] plot[variable=x,domain=0:360,smooth,samples=71]
          (torusx(x,vcrit1(x,tdplotmaintheta),R,r),
          torusy(x,vcrit1(x,tdplotmaintheta),R,r),
          torusz(x,vcrit1(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r):-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=umax(tdplotmaintheta,R,r):180-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          draw[thick] plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r)/2:-umax(tdplotmaintheta,R,r)/2,smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          foreach X in 300
          draw[thick,dashed]
          plot[smooth,variable=x,domain=360+vcrit1(X,tdplotmaintheta):vcrit2(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick]
          plot[smooth,variable=x,domain=vcrit2(X,tdplotmaintheta):vcrit1(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick,-latex]
          plot[smooth,variable=x,domain=vcrit1(X,tdplotmaintheta):90,samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));

          draw[thick,-latex] plot[smooth,variable=x,domain=00:360,samples=71]
          (torusx(x,90,R,r),
          torusy(x,90,R,r),
          torusz(x,90,R,r));
          beginscope[declare function=myu(x)=sin(2*x)*sin(x);
          myv(x)=sin(2*x)*cos(x);]
          draw[thick,fill=white] plot[smooth,variable=x,domain=00:90,samples=71]
          (torusx(-60+45*myu(x),90-45*myv(x),R,r),
          torusy(-60+45*myu(x),90-45*myv(x),R,r),
          torusz(-60+45*myu(x),90-45*myv(x),R,r));
          endscope
          endtikzpicture
          enddocument


          enter image description here



          If you want a cartoon, consider e.g.



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibraryarrows.meta,bending,decorations.markings,intersections
          % https://tex.stackexchange.com/a/430239/121799
          tikzset% inspired by https://tex.stackexchange.com/a/316050/121799
          arc arrow/.style args=%
          to pos #1 with length #2
          decoration=
          markings,
          mark=at position 0 with pgfextra%
          pgfmathsetmacrotmpArrowTime#2/(pgfdecoratedpathlength)
          xdeftmpArrowTimetmpArrowTime,
          mark=at position #1-tmpArrowTime with coordinate(@1);,
          mark=at position #1-2*tmpArrowTime/3 with coordinate(@2);,
          mark=at position #1-tmpArrowTime/3 with coordinate(@3);,
          mark=at position #1 with coordinate(@4);
          draw[-Stealth[length=#2,bend]]
          (@1) .. controls (@2) and (@3) .. (@4);,
          ,
          postaction=decorate,
          ,bent arrow/.style=arc arrow=to pos #1 with length 2mm,


          begindocument
          begintikzpicture[scale=4]
          beginscope[local bounding box=left]
          draw[fill=blue!20,even odd rule] (0,0) ellipse (1 and .75)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.25] (xt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw[bent arrow=0.2,thick,name path=b] (-65:1 and .75) to[out=40,in=10]
          node[pos=0.2,right]$b$ (xt);
          draw[dashed] (xt) to[out=-170,in=-140] (-65:1 and .75);
          draw[bent arrow=0.98,thick,name path=a] (0.8,0.05) arc(0:360:0.8 and .5)
          node[pos=0.2,below]$ell$ node[pos=0.98,right]$a$;
          draw[name intersections=of=a and b,by=i,fill=white] (i)
          to[out=45,in=-45] ++ (0.2,0.4) to[out=135,in=45](i);
          endscope
          %
          beginscope[local bounding box=right,xshift=2.5cm]
          draw[fill=blue!20,even odd rule]
          (-0.7,-1) to[out=90,in=-90] (-1,0) arc(180:0:1 and .75)
          to[out=-90,in=90] coordinate[pos=0.7] (ys) (0.7,-1) arc(0:180:0.7 and 0.12) coordinate[pos=0.5] (p)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.5] (yt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw (0.7,-1) arc(0:-180:0.7 and 0.12);
          draw[bent arrow=0.5,thick] (p) to[out=70,in=-120] (-20:0.8 and .5)
          arc(-20:200:0.8 and .5) node[pos=0.5,below]$a$ to[out=-60,in=110] cycle;
          draw[bent arrow=0.5,thick] (p) to[out=80,in=180] node[pos=0.5,right]$b$ (yt);
          draw[dashed] (yt) to[out=0,in=70] (ys);
          draw[thick] (ys) to[out=-110,in=20] (p);
          endscope
          path (left) -- (right) node[midway,scale=2]$simeq$;
          endtikzpicture
          enddocument


          enter image description here



          Unlike in the above picture, you cannot adjust the view angle.






          share|improve this answer

























          • Is it also easier to do the second picture with this method?

            – Gabriel Ribeiro
            yesterday






          • 1





            @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

            – marmot
            yesterday






          • 1





            @GabrielRibeiro I also added cartoons.

            – marmot
            yesterday






          • 1





            This is beautiful! Thank you a lot

            – Gabriel Ribeiro
            yesterday













          11












          11








          11







          If you really intend to play with these tori, you may eventually want to switch to 3d coordinates, where it is possible to find out whether a coordinate is on the visible or hidden patch.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords600
          tikzsetdeclare function=torusx(u,v,R,r)=cos(u)*(R + r*cos(v));
          torusy(u,v,R,r)=(R + r*cos(v))*sin(u);
          torusz(u,v,R,r)=r*sin(v);
          vcrit1(u,th)=atan(tan(th)*sin(u));% first critical v value
          vcrit2(u,th)=180+atan(tan(th)*sin(u));% second critical v value
          disc(th,R,r)=((pow(r,2)-pow(R,2))*pow(cot(th),2)+%
          pow(r,2)*(2+pow(tan(th),2)))/pow(R,2);% discriminant
          umax(th,R,r)=ifthenelse(disc(th,R,r)>0,asin(sqrt(abs(disc(th,R,r)))),0);


          begintikzpicture[tdplot_main_coords]
          pgfmathsetmacroR4
          pgfmathsetmacror1.5
          draw[thick,fill=gray,even odd rule,fill opacity=0.2] plot[variable=x,domain=0:360,smooth,samples=71]
          (torusx(x,vcrit1(x,tdplotmaintheta),R,r),
          torusy(x,vcrit1(x,tdplotmaintheta),R,r),
          torusz(x,vcrit1(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r):-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=umax(tdplotmaintheta,R,r):180-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          draw[thick] plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r)/2:-umax(tdplotmaintheta,R,r)/2,smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          foreach X in 300
          draw[thick,dashed]
          plot[smooth,variable=x,domain=360+vcrit1(X,tdplotmaintheta):vcrit2(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick]
          plot[smooth,variable=x,domain=vcrit2(X,tdplotmaintheta):vcrit1(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick,-latex]
          plot[smooth,variable=x,domain=vcrit1(X,tdplotmaintheta):90,samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));

          draw[thick,-latex] plot[smooth,variable=x,domain=00:360,samples=71]
          (torusx(x,90,R,r),
          torusy(x,90,R,r),
          torusz(x,90,R,r));
          beginscope[declare function=myu(x)=sin(2*x)*sin(x);
          myv(x)=sin(2*x)*cos(x);]
          draw[thick,fill=white] plot[smooth,variable=x,domain=00:90,samples=71]
          (torusx(-60+45*myu(x),90-45*myv(x),R,r),
          torusy(-60+45*myu(x),90-45*myv(x),R,r),
          torusz(-60+45*myu(x),90-45*myv(x),R,r));
          endscope
          endtikzpicture
          enddocument


          enter image description here



          If you want a cartoon, consider e.g.



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibraryarrows.meta,bending,decorations.markings,intersections
          % https://tex.stackexchange.com/a/430239/121799
          tikzset% inspired by https://tex.stackexchange.com/a/316050/121799
          arc arrow/.style args=%
          to pos #1 with length #2
          decoration=
          markings,
          mark=at position 0 with pgfextra%
          pgfmathsetmacrotmpArrowTime#2/(pgfdecoratedpathlength)
          xdeftmpArrowTimetmpArrowTime,
          mark=at position #1-tmpArrowTime with coordinate(@1);,
          mark=at position #1-2*tmpArrowTime/3 with coordinate(@2);,
          mark=at position #1-tmpArrowTime/3 with coordinate(@3);,
          mark=at position #1 with coordinate(@4);
          draw[-Stealth[length=#2,bend]]
          (@1) .. controls (@2) and (@3) .. (@4);,
          ,
          postaction=decorate,
          ,bent arrow/.style=arc arrow=to pos #1 with length 2mm,


          begindocument
          begintikzpicture[scale=4]
          beginscope[local bounding box=left]
          draw[fill=blue!20,even odd rule] (0,0) ellipse (1 and .75)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.25] (xt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw[bent arrow=0.2,thick,name path=b] (-65:1 and .75) to[out=40,in=10]
          node[pos=0.2,right]$b$ (xt);
          draw[dashed] (xt) to[out=-170,in=-140] (-65:1 and .75);
          draw[bent arrow=0.98,thick,name path=a] (0.8,0.05) arc(0:360:0.8 and .5)
          node[pos=0.2,below]$ell$ node[pos=0.98,right]$a$;
          draw[name intersections=of=a and b,by=i,fill=white] (i)
          to[out=45,in=-45] ++ (0.2,0.4) to[out=135,in=45](i);
          endscope
          %
          beginscope[local bounding box=right,xshift=2.5cm]
          draw[fill=blue!20,even odd rule]
          (-0.7,-1) to[out=90,in=-90] (-1,0) arc(180:0:1 and .75)
          to[out=-90,in=90] coordinate[pos=0.7] (ys) (0.7,-1) arc(0:180:0.7 and 0.12) coordinate[pos=0.5] (p)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.5] (yt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw (0.7,-1) arc(0:-180:0.7 and 0.12);
          draw[bent arrow=0.5,thick] (p) to[out=70,in=-120] (-20:0.8 and .5)
          arc(-20:200:0.8 and .5) node[pos=0.5,below]$a$ to[out=-60,in=110] cycle;
          draw[bent arrow=0.5,thick] (p) to[out=80,in=180] node[pos=0.5,right]$b$ (yt);
          draw[dashed] (yt) to[out=0,in=70] (ys);
          draw[thick] (ys) to[out=-110,in=20] (p);
          endscope
          path (left) -- (right) node[midway,scale=2]$simeq$;
          endtikzpicture
          enddocument


          enter image description here



          Unlike in the above picture, you cannot adjust the view angle.






          share|improve this answer















          If you really intend to play with these tori, you may eventually want to switch to 3d coordinates, where it is possible to find out whether a coordinate is on the visible or hidden patch.



          documentclass[tikz,border=3.14mm]standalone
          usepackagetikz-3dplot
          begindocument
          tdplotsetmaincoords600
          tikzsetdeclare function=torusx(u,v,R,r)=cos(u)*(R + r*cos(v));
          torusy(u,v,R,r)=(R + r*cos(v))*sin(u);
          torusz(u,v,R,r)=r*sin(v);
          vcrit1(u,th)=atan(tan(th)*sin(u));% first critical v value
          vcrit2(u,th)=180+atan(tan(th)*sin(u));% second critical v value
          disc(th,R,r)=((pow(r,2)-pow(R,2))*pow(cot(th),2)+%
          pow(r,2)*(2+pow(tan(th),2)))/pow(R,2);% discriminant
          umax(th,R,r)=ifthenelse(disc(th,R,r)>0,asin(sqrt(abs(disc(th,R,r)))),0);


          begintikzpicture[tdplot_main_coords]
          pgfmathsetmacroR4
          pgfmathsetmacror1.5
          draw[thick,fill=gray,even odd rule,fill opacity=0.2] plot[variable=x,domain=0:360,smooth,samples=71]
          (torusx(x,vcrit1(x,tdplotmaintheta),R,r),
          torusy(x,vcrit1(x,tdplotmaintheta),R,r),
          torusz(x,vcrit1(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r):-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r))
          plot[variable=x,
          domain=umax(tdplotmaintheta,R,r):180-umax(tdplotmaintheta,R,r),smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          draw[thick] plot[variable=x,
          domain=-180+umax(tdplotmaintheta,R,r)/2:-umax(tdplotmaintheta,R,r)/2,smooth,samples=51]
          (torusx(x,vcrit2(x,tdplotmaintheta),R,r),
          torusy(x,vcrit2(x,tdplotmaintheta),R,r),
          torusz(x,vcrit2(x,tdplotmaintheta),R,r));
          foreach X in 300
          draw[thick,dashed]
          plot[smooth,variable=x,domain=360+vcrit1(X,tdplotmaintheta):vcrit2(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick]
          plot[smooth,variable=x,domain=vcrit2(X,tdplotmaintheta):vcrit1(X,tdplotmaintheta),samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));
          draw[thick,-latex]
          plot[smooth,variable=x,domain=vcrit1(X,tdplotmaintheta):90,samples=71]
          (torusx(X,x,R,r),torusy(X,x,R,r),torusz(X,x,R,r));

          draw[thick,-latex] plot[smooth,variable=x,domain=00:360,samples=71]
          (torusx(x,90,R,r),
          torusy(x,90,R,r),
          torusz(x,90,R,r));
          beginscope[declare function=myu(x)=sin(2*x)*sin(x);
          myv(x)=sin(2*x)*cos(x);]
          draw[thick,fill=white] plot[smooth,variable=x,domain=00:90,samples=71]
          (torusx(-60+45*myu(x),90-45*myv(x),R,r),
          torusy(-60+45*myu(x),90-45*myv(x),R,r),
          torusz(-60+45*myu(x),90-45*myv(x),R,r));
          endscope
          endtikzpicture
          enddocument


          enter image description here



          If you want a cartoon, consider e.g.



          documentclass[tikz,border=3.14mm]standalone
          usetikzlibraryarrows.meta,bending,decorations.markings,intersections
          % https://tex.stackexchange.com/a/430239/121799
          tikzset% inspired by https://tex.stackexchange.com/a/316050/121799
          arc arrow/.style args=%
          to pos #1 with length #2
          decoration=
          markings,
          mark=at position 0 with pgfextra%
          pgfmathsetmacrotmpArrowTime#2/(pgfdecoratedpathlength)
          xdeftmpArrowTimetmpArrowTime,
          mark=at position #1-tmpArrowTime with coordinate(@1);,
          mark=at position #1-2*tmpArrowTime/3 with coordinate(@2);,
          mark=at position #1-tmpArrowTime/3 with coordinate(@3);,
          mark=at position #1 with coordinate(@4);
          draw[-Stealth[length=#2,bend]]
          (@1) .. controls (@2) and (@3) .. (@4);,
          ,
          postaction=decorate,
          ,bent arrow/.style=arc arrow=to pos #1 with length 2mm,


          begindocument
          begintikzpicture[scale=4]
          beginscope[local bounding box=left]
          draw[fill=blue!20,even odd rule] (0,0) ellipse (1 and .75)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.25] (xt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw[bent arrow=0.2,thick,name path=b] (-65:1 and .75) to[out=40,in=10]
          node[pos=0.2,right]$b$ (xt);
          draw[dashed] (xt) to[out=-170,in=-140] (-65:1 and .75);
          draw[bent arrow=0.98,thick,name path=a] (0.8,0.05) arc(0:360:0.8 and .5)
          node[pos=0.2,below]$ell$ node[pos=0.98,right]$a$;
          draw[name intersections=of=a and b,by=i,fill=white] (i)
          to[out=45,in=-45] ++ (0.2,0.4) to[out=135,in=45](i);
          endscope
          %
          beginscope[local bounding box=right,xshift=2.5cm]
          draw[fill=blue!20,even odd rule]
          (-0.7,-1) to[out=90,in=-90] (-1,0) arc(180:0:1 and .75)
          to[out=-90,in=90] coordinate[pos=0.7] (ys) (0.7,-1) arc(0:180:0.7 and 0.12) coordinate[pos=0.5] (p)
          (-0.5,0) arc(120:60:1 and 1.25) arc(-60:-120:1 and 1.25) coordinate[pos=0.5] (yt);
          draw (-0.5,0) arc(-120:-130:1 and 1.25) (0.5,0) arc(-60:-50:1 and 1.25);
          draw (0.7,-1) arc(0:-180:0.7 and 0.12);
          draw[bent arrow=0.5,thick] (p) to[out=70,in=-120] (-20:0.8 and .5)
          arc(-20:200:0.8 and .5) node[pos=0.5,below]$a$ to[out=-60,in=110] cycle;
          draw[bent arrow=0.5,thick] (p) to[out=80,in=180] node[pos=0.5,right]$b$ (yt);
          draw[dashed] (yt) to[out=0,in=70] (ys);
          draw[thick] (ys) to[out=-110,in=20] (p);
          endscope
          path (left) -- (right) node[midway,scale=2]$simeq$;
          endtikzpicture
          enddocument


          enter image description here



          Unlike in the above picture, you cannot adjust the view angle.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          marmotmarmot

          112k5140264




          112k5140264












          • Is it also easier to do the second picture with this method?

            – Gabriel Ribeiro
            yesterday






          • 1





            @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

            – marmot
            yesterday






          • 1





            @GabrielRibeiro I also added cartoons.

            – marmot
            yesterday






          • 1





            This is beautiful! Thank you a lot

            – Gabriel Ribeiro
            yesterday

















          • Is it also easier to do the second picture with this method?

            – Gabriel Ribeiro
            yesterday






          • 1





            @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

            – marmot
            yesterday






          • 1





            @GabrielRibeiro I also added cartoons.

            – marmot
            yesterday






          • 1





            This is beautiful! Thank you a lot

            – Gabriel Ribeiro
            yesterday
















          Is it also easier to do the second picture with this method?

          – Gabriel Ribeiro
          yesterday





          Is it also easier to do the second picture with this method?

          – Gabriel Ribeiro
          yesterday




          1




          1





          @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

          – marmot
          yesterday





          @GabrielRibeiro It depends on what you want to do in the end. This proposal makes more sense if you have to draw several tori with cycles and so on. If you just need two quick cartoons, this might be an overkill.

          – marmot
          yesterday




          1




          1





          @GabrielRibeiro I also added cartoons.

          – marmot
          yesterday





          @GabrielRibeiro I also added cartoons.

          – marmot
          yesterday




          1




          1





          This is beautiful! Thank you a lot

          – Gabriel Ribeiro
          yesterday





          This is beautiful! Thank you a lot

          – Gabriel Ribeiro
          yesterday











          4














          Using the tqft package:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/481212/86
          usepackagetikz
          usetikzlibrary
          tqft,
          decorations.markings,
          arrows.meta,
          hobby,
          calc


          begindocument

          begintikzpicture[use Hobby shortcut]
          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=top
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 0,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=bottom,
          at=(top-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          ,
          postaction=decorate
          ]
          (bottom-between first incoming and last incoming) to[out=45,in=-45] node[pos=.25,right] (b) coordinate[pos=.5] (a) (bottom-between incoming 1 and 2);
          draw[dashed] (bottom-between first incoming and last incoming) to[out=135,in=-135] (bottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ] ([closed]$(bottom-between first incoming and last incoming)!.5!(bottom-between incoming 1 and 2)$) .. (bottom-incoming boundary 2.north) .. ($(top-between first and last outgoing)!.5!(top-between outgoing 1 and 2)$) .. (bottom-incoming boundary 1.north);
          draw[fill=white] ([out angle=30]a) .. ++(1,.5) .. ++(.5,.6) .. ++(-.25,0) .. ([in angle=30]a);

          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=secondtop,
          at=(7,0)
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 1,
          offset=.5,
          cobordism edge/.style=draw,
          every outgoing boundary component/.style=transform shape,draw,
          fill=gray!50,
          name=secondbottom,
          at=(secondtop-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .5 with arrowLatex,
          mark=at position .5 with node[right] (b);,
          ,
          postaction=decorate
          ]
          (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between incoming 1 and 2);
          draw (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between last incoming and last outgoing);
          draw[dashed] (secondbottom-between last incoming and last outgoing) to[out=45,in=0] (secondbottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ]
          ([out angle=90]secondbottom-outgoing boundary 1.north) .. (secondbottom-incoming boundary 2.north) .. ($(secondtop-between first and last outgoing)!.5!(secondtop-between outgoing 1 and 2)$) .. (secondbottom-incoming boundary 1.north) .. ([in angle=90]secondbottom-outgoing boundary 1.north);

          node at ($(top-outgoing boundary 2.east)!.5!(secondtop-outgoing boundary 1.west)$) (simeq);
          endtikzpicture
          enddocument


          Homotopy equivalence of tori






          share|improve this answer























          • That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

            – marmot
            6 hours ago












          • documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

            – marmot
            6 hours ago















          4














          Using the tqft package:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/481212/86
          usepackagetikz
          usetikzlibrary
          tqft,
          decorations.markings,
          arrows.meta,
          hobby,
          calc


          begindocument

          begintikzpicture[use Hobby shortcut]
          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=top
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 0,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=bottom,
          at=(top-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          ,
          postaction=decorate
          ]
          (bottom-between first incoming and last incoming) to[out=45,in=-45] node[pos=.25,right] (b) coordinate[pos=.5] (a) (bottom-between incoming 1 and 2);
          draw[dashed] (bottom-between first incoming and last incoming) to[out=135,in=-135] (bottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ] ([closed]$(bottom-between first incoming and last incoming)!.5!(bottom-between incoming 1 and 2)$) .. (bottom-incoming boundary 2.north) .. ($(top-between first and last outgoing)!.5!(top-between outgoing 1 and 2)$) .. (bottom-incoming boundary 1.north);
          draw[fill=white] ([out angle=30]a) .. ++(1,.5) .. ++(.5,.6) .. ++(-.25,0) .. ([in angle=30]a);

          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=secondtop,
          at=(7,0)
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 1,
          offset=.5,
          cobordism edge/.style=draw,
          every outgoing boundary component/.style=transform shape,draw,
          fill=gray!50,
          name=secondbottom,
          at=(secondtop-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .5 with arrowLatex,
          mark=at position .5 with node[right] (b);,
          ,
          postaction=decorate
          ]
          (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between incoming 1 and 2);
          draw (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between last incoming and last outgoing);
          draw[dashed] (secondbottom-between last incoming and last outgoing) to[out=45,in=0] (secondbottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ]
          ([out angle=90]secondbottom-outgoing boundary 1.north) .. (secondbottom-incoming boundary 2.north) .. ($(secondtop-between first and last outgoing)!.5!(secondtop-between outgoing 1 and 2)$) .. (secondbottom-incoming boundary 1.north) .. ([in angle=90]secondbottom-outgoing boundary 1.north);

          node at ($(top-outgoing boundary 2.east)!.5!(secondtop-outgoing boundary 1.west)$) (simeq);
          endtikzpicture
          enddocument


          Homotopy equivalence of tori






          share|improve this answer























          • That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

            – marmot
            6 hours ago












          • documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

            – marmot
            6 hours ago













          4












          4








          4







          Using the tqft package:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/481212/86
          usepackagetikz
          usetikzlibrary
          tqft,
          decorations.markings,
          arrows.meta,
          hobby,
          calc


          begindocument

          begintikzpicture[use Hobby shortcut]
          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=top
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 0,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=bottom,
          at=(top-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          ,
          postaction=decorate
          ]
          (bottom-between first incoming and last incoming) to[out=45,in=-45] node[pos=.25,right] (b) coordinate[pos=.5] (a) (bottom-between incoming 1 and 2);
          draw[dashed] (bottom-between first incoming and last incoming) to[out=135,in=-135] (bottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ] ([closed]$(bottom-between first incoming and last incoming)!.5!(bottom-between incoming 1 and 2)$) .. (bottom-incoming boundary 2.north) .. ($(top-between first and last outgoing)!.5!(top-between outgoing 1 and 2)$) .. (bottom-incoming boundary 1.north);
          draw[fill=white] ([out angle=30]a) .. ++(1,.5) .. ++(.5,.6) .. ++(-.25,0) .. ([in angle=30]a);

          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=secondtop,
          at=(7,0)
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 1,
          offset=.5,
          cobordism edge/.style=draw,
          every outgoing boundary component/.style=transform shape,draw,
          fill=gray!50,
          name=secondbottom,
          at=(secondtop-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .5 with arrowLatex,
          mark=at position .5 with node[right] (b);,
          ,
          postaction=decorate
          ]
          (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between incoming 1 and 2);
          draw (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between last incoming and last outgoing);
          draw[dashed] (secondbottom-between last incoming and last outgoing) to[out=45,in=0] (secondbottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ]
          ([out angle=90]secondbottom-outgoing boundary 1.north) .. (secondbottom-incoming boundary 2.north) .. ($(secondtop-between first and last outgoing)!.5!(secondtop-between outgoing 1 and 2)$) .. (secondbottom-incoming boundary 1.north) .. ([in angle=90]secondbottom-outgoing boundary 1.north);

          node at ($(top-outgoing boundary 2.east)!.5!(secondtop-outgoing boundary 1.west)$) (simeq);
          endtikzpicture
          enddocument


          Homotopy equivalence of tori






          share|improve this answer













          Using the tqft package:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/481212/86
          usepackagetikz
          usetikzlibrary
          tqft,
          decorations.markings,
          arrows.meta,
          hobby,
          calc


          begindocument

          begintikzpicture[use Hobby shortcut]
          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=top
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 0,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=bottom,
          at=(top-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          ,
          postaction=decorate
          ]
          (bottom-between first incoming and last incoming) to[out=45,in=-45] node[pos=.25,right] (b) coordinate[pos=.5] (a) (bottom-between incoming 1 and 2);
          draw[dashed] (bottom-between first incoming and last incoming) to[out=135,in=-135] (bottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ] ([closed]$(bottom-between first incoming and last incoming)!.5!(bottom-between incoming 1 and 2)$) .. (bottom-incoming boundary 2.north) .. ($(top-between first and last outgoing)!.5!(top-between outgoing 1 and 2)$) .. (bottom-incoming boundary 1.north);
          draw[fill=white] ([out angle=30]a) .. ++(1,.5) .. ++(.5,.6) .. ++(-.25,0) .. ([in angle=30]a);

          pic[
          scale=2,
          tqft,
          incoming boundary components = 0,
          outgoing boundary components = 2,
          cobordism edge/.style=draw,
          fill=gray!50,
          name=secondtop,
          at=(7,0)
          ];
          pic[
          scale=2,
          tqft,
          incoming boundary components = 2,
          outgoing boundary components = 1,
          offset=.5,
          cobordism edge/.style=draw,
          every outgoing boundary component/.style=transform shape,draw,
          fill=gray!50,
          name=secondbottom,
          at=(secondtop-outgoing boundary 1)
          ];
          draw[
          decoration=
          markings,
          mark=at position .5 with arrowLatex,
          mark=at position .5 with node[right] (b);,
          ,
          postaction=decorate
          ]
          (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between incoming 1 and 2);
          draw (secondbottom-outgoing boundary 1.north) to[out=90,in=-135] (secondbottom-between last incoming and last outgoing);
          draw[dashed] (secondbottom-between last incoming and last outgoing) to[out=45,in=0] (secondbottom-between incoming 1 and 2);
          draw[
          decoration=
          markings,
          mark=at position .25 with arrowLatex,
          mark=at position .25 with node[right] (a);,
          ,
          postaction=decorate
          ]
          ([out angle=90]secondbottom-outgoing boundary 1.north) .. (secondbottom-incoming boundary 2.north) .. ($(secondtop-between first and last outgoing)!.5!(secondtop-between outgoing 1 and 2)$) .. (secondbottom-incoming boundary 1.north) .. ([in angle=90]secondbottom-outgoing boundary 1.north);

          node at ($(top-outgoing boundary 2.east)!.5!(secondtop-outgoing boundary 1.west)$) (simeq);
          endtikzpicture
          enddocument


          Homotopy equivalence of tori







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Loop SpaceLoop Space

          113k29307609




          113k29307609












          • That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

            – marmot
            6 hours ago












          • documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

            – marmot
            6 hours ago

















          • That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

            – marmot
            6 hours ago












          • documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

            – marmot
            6 hours ago
















          That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

          – marmot
          6 hours ago






          That's great! Didn't know that package even exists. May I bug you with a tikzmark issue? If you have a text in an equation and then switch to math mode inside the text, tikzmarknode does not seem to want to cooporate any more. (next comment)

          – marmot
          6 hours ago














          documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

          – marmot
          6 hours ago





          documentclassbeamer usepackagetikz usetikzlibrarytikzmark begindocument beginframe[t] frametitleTest [f(tikzmarknodexx)=x^tikzmarknodealpha1alphaquadtextwith $tikzmarknodealpha2alpha>0$] begintikzpicture[overlay,remember picture] draw[latex-latex] (x) to[bend left] node[midway,above]works (alpha1); draw[latex-latex] (x) to[bend right] node[midway,below]doesn't work (alpha2); endtikzpicture endframe enddocument

          – marmot
          6 hours ago

















          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%2f481212%2fdrawing-a-topological-handle-with-tikz%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







          uAF2wd2uV,1JN2GSn
          whLYcKbLU,De4220,rOJa RhW ui4h,NyL 4V3DKkzJhdsUZ7V,QuhHA,dZoleNDhop74WO,p3H7YQ44LdzoWla cBUM3VTp6,dUH Ug8W1y

          Popular posts from this blog

          getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

          NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided

          Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.