How to draw two concentric simple closed curves using tikz

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












What is a small piece ot tikz code for reproducing the figure below ?



enter image description here



Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf



Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.







share|improve this question


























    up vote
    3
    down vote

    favorite












    What is a small piece ot tikz code for reproducing the figure below ?



    enter image description here



    Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf



    Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.







    share|improve this question
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      What is a small piece ot tikz code for reproducing the figure below ?



      enter image description here



      Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf



      Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.







      share|improve this question














      What is a small piece ot tikz code for reproducing the figure below ?



      enter image description here



      Source: http://withits.epfl.ch/_media/events/slides-elgamal.pdf



      Notes: I'm familiar with this question Draw a $epsilon$ neighborhood, but it doesn't really answer my quest.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 22 at 14:23









      marmot

      55.4k460121




      55.4k460121










      asked Aug 22 at 14:00









      dohmatob

      1183




      1183




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          Welcome to TeX.SE! EDIT: Adjusted the tension parameter to get a smoother output.



          documentclass[tikz,border=3.14mm]standalone
          begindocument
          begintikzpicture
          draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
          (1.2,-0.3) (0.4,-0.4);
          draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
          draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
          node[right]$Gamma_ell(mathcalA)$;
          endtikzpicture
          enddocument


          enter image description here



          This animation shows a bit what tension does.



          documentclass[tikz,border=3.14mm]standalone
          begindocument
          foreach X in 0.5,0.6,...,1.5
          begintikzpicture
          draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
          (1.2,-0.3) (0.4,-0.4);
          draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
          draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
          node[right]$Gamma_ell(mathcalA)$;
          endtikzpicture
          enddocument


          enter image description here



          Of course, you can also adjust the coordinates.






          share|improve this answer





























            up vote
            4
            down vote













            You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)... You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.



            documentclass[tikz,border=5pt]standalone
            usetikzlibraryarrows.meta
            begindocument

            begintikzpicture[scale=.5, > = Stealth]
            draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
            (-2,3) .. controls (-1,5) and (1,5.3) ..
            (2,5) .. controls (5,4) and (3,0) ..
            (1,0) -- cycle;
            draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
            draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
            endtikzpicture

            enddocument



            enter image description here







            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',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              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%2f447181%2fhow-to-draw-two-concentric-simple-closed-curves-using-tikz%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              5
              down vote



              accepted










              Welcome to TeX.SE! EDIT: Adjusted the tension parameter to get a smoother output.



              documentclass[tikz,border=3.14mm]standalone
              begindocument
              begintikzpicture
              draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
              (1.2,-0.3) (0.4,-0.4);
              draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
              draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
              node[right]$Gamma_ell(mathcalA)$;
              endtikzpicture
              enddocument


              enter image description here



              This animation shows a bit what tension does.



              documentclass[tikz,border=3.14mm]standalone
              begindocument
              foreach X in 0.5,0.6,...,1.5
              begintikzpicture
              draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
              (1.2,-0.3) (0.4,-0.4);
              draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
              draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
              node[right]$Gamma_ell(mathcalA)$;
              endtikzpicture
              enddocument


              enter image description here



              Of course, you can also adjust the coordinates.






              share|improve this answer


























                up vote
                5
                down vote



                accepted










                Welcome to TeX.SE! EDIT: Adjusted the tension parameter to get a smoother output.



                documentclass[tikz,border=3.14mm]standalone
                begindocument
                begintikzpicture
                draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                (1.2,-0.3) (0.4,-0.4);
                draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                node[right]$Gamma_ell(mathcalA)$;
                endtikzpicture
                enddocument


                enter image description here



                This animation shows a bit what tension does.



                documentclass[tikz,border=3.14mm]standalone
                begindocument
                foreach X in 0.5,0.6,...,1.5
                begintikzpicture
                draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                (1.2,-0.3) (0.4,-0.4);
                draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                node[right]$Gamma_ell(mathcalA)$;
                endtikzpicture
                enddocument


                enter image description here



                Of course, you can also adjust the coordinates.






                share|improve this answer
























                  up vote
                  5
                  down vote



                  accepted







                  up vote
                  5
                  down vote



                  accepted






                  Welcome to TeX.SE! EDIT: Adjusted the tension parameter to get a smoother output.



                  documentclass[tikz,border=3.14mm]standalone
                  begindocument
                  begintikzpicture
                  draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                  (1.2,-0.3) (0.4,-0.4);
                  draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                  draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                  node[right]$Gamma_ell(mathcalA)$;
                  endtikzpicture
                  enddocument


                  enter image description here



                  This animation shows a bit what tension does.



                  documentclass[tikz,border=3.14mm]standalone
                  begindocument
                  foreach X in 0.5,0.6,...,1.5
                  begintikzpicture
                  draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                  (1.2,-0.3) (0.4,-0.4);
                  draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                  draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                  node[right]$Gamma_ell(mathcalA)$;
                  endtikzpicture
                  enddocument


                  enter image description here



                  Of course, you can also adjust the coordinates.






                  share|improve this answer














                  Welcome to TeX.SE! EDIT: Adjusted the tension parameter to get a smoother output.



                  documentclass[tikz,border=3.14mm]standalone
                  begindocument
                  begintikzpicture
                  draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=0.7] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                  (1.2,-0.3) (0.4,-0.4);
                  draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                  draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                  node[right]$Gamma_ell(mathcalA)$;
                  endtikzpicture
                  enddocument


                  enter image description here



                  This animation shows a bit what tension does.



                  documentclass[tikz,border=3.14mm]standalone
                  begindocument
                  foreach X in 0.5,0.6,...,1.5
                  begintikzpicture
                  draw[double distance=6pt,fill=blue] plot[smooth cycle,tension=X] coordinates (0,0) (0.3,0.6) (1,0.8) (1.4,0.2)
                  (1.2,-0.3) (0.4,-0.4);
                  draw[latex-] (3pt,0) -- ++(-1,-0.2) node[left]$mathcalA$;
                  draw[latex-] (1.4cm+3pt,0.2) -- ++(1,-0.2)
                  node[right]$Gamma_ell(mathcalA)$;
                  endtikzpicture
                  enddocument


                  enter image description here



                  Of course, you can also adjust the coordinates.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 22 at 16:29

























                  answered Aug 22 at 14:20









                  marmot

                  55.4k460121




                  55.4k460121




















                      up vote
                      4
                      down vote













                      You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)... You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.



                      documentclass[tikz,border=5pt]standalone
                      usetikzlibraryarrows.meta
                      begindocument

                      begintikzpicture[scale=.5, > = Stealth]
                      draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
                      (-2,3) .. controls (-1,5) and (1,5.3) ..
                      (2,5) .. controls (5,4) and (3,0) ..
                      (1,0) -- cycle;
                      draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
                      draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
                      endtikzpicture

                      enddocument



                      enter image description here







                      share|improve this answer


























                        up vote
                        4
                        down vote













                        You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)... You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.



                        documentclass[tikz,border=5pt]standalone
                        usetikzlibraryarrows.meta
                        begindocument

                        begintikzpicture[scale=.5, > = Stealth]
                        draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
                        (-2,3) .. controls (-1,5) and (1,5.3) ..
                        (2,5) .. controls (5,4) and (3,0) ..
                        (1,0) -- cycle;
                        draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
                        draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
                        endtikzpicture

                        enddocument



                        enter image description here







                        share|improve this answer
























                          up vote
                          4
                          down vote










                          up vote
                          4
                          down vote









                          You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)... You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.



                          documentclass[tikz,border=5pt]standalone
                          usetikzlibraryarrows.meta
                          begindocument

                          begintikzpicture[scale=.5, > = Stealth]
                          draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
                          (-2,3) .. controls (-1,5) and (1,5.3) ..
                          (2,5) .. controls (5,4) and (3,0) ..
                          (1,0) -- cycle;
                          draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
                          draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
                          endtikzpicture

                          enddocument



                          enter image description here







                          share|improve this answer














                          You can simply start by drawing a triangle like draw (1,0)--(-2,3)--(2,5)--cycle, then, with the aid of a grid you start adding two control points between each pair of vertices like .. controls (a) and (b)... You need to tweak the control points a bit to get the desired shape. Look at this answer, e.g., to know more about how to choose control points.



                          documentclass[tikz,border=5pt]standalone
                          usetikzlibraryarrows.meta
                          begindocument

                          begintikzpicture[scale=.5, > = Stealth]
                          draw[double distance=10pt,fill=blue] (1,0) .. controls (-1.5,0) and (-2.5,2)..
                          (-2,3) .. controls (-1,5) and (1,5.3) ..
                          (2,5) .. controls (5,4) and (3,0) ..
                          (1,0) -- cycle;
                          draw[<-] (-1.5,1.5) -- ++(-1,-0.2) node[left]$mathcalA$;
                          draw[<-] (3.5,1.5) -- ++(1,-0.2) node[right]$Gamma_ell(mathcalA)$;
                          endtikzpicture

                          enddocument



                          enter image description here








                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Aug 22 at 17:51

























                          answered Aug 22 at 17:43









                          AboAmmar

                          30.4k22780




                          30.4k22780



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447181%2fhow-to-draw-two-concentric-simple-closed-curves-using-tikz%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              Installing NextGIS Connect into QGIS 3?

                              One-line joke