How to add patterns inside shapes bounded by curves?

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












3















It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:



documentclassarticle
usepackagetikz

begindocument
begintikzpicture
draw (-1,1) node (v1) circle (4.5);
draw (v1) circle (2.5);
draw (-5.5,1) arc (180:360:1 and .25);
draw (1.5,1) arc (180:360:1 and .25);
endtikzpicture
enddocument









share|improve this question




























    3















    It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:



    documentclassarticle
    usepackagetikz

    begindocument
    begintikzpicture
    draw (-1,1) node (v1) circle (4.5);
    draw (v1) circle (2.5);
    draw (-5.5,1) arc (180:360:1 and .25);
    draw (1.5,1) arc (180:360:1 and .25);
    endtikzpicture
    enddocument









    share|improve this question


























      3












      3








      3


      0






      It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:



      documentclassarticle
      usepackagetikz

      begindocument
      begintikzpicture
      draw (-1,1) node (v1) circle (4.5);
      draw (v1) circle (2.5);
      draw (-5.5,1) arc (180:360:1 and .25);
      draw (1.5,1) arc (180:360:1 and .25);
      endtikzpicture
      enddocument









      share|improve this question
















      It is easy to use patterns for nice shapes like rectangle. How to fill an area by patterns enclosed by some curves? For example I have trouble with adding pattern to the following between two arcs:



      documentclassarticle
      usepackagetikz

      begindocument
      begintikzpicture
      draw (-1,1) node (v1) circle (4.5);
      draw (v1) circle (2.5);
      draw (-5.5,1) arc (180:360:1 and .25);
      draw (1.5,1) arc (180:360:1 and .25);
      endtikzpicture
      enddocument






      tikz-pgf pattern






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 3 at 7:57









      hpekristiansen

      5,38362866




      5,38362866










      asked Feb 3 at 7:14









      C.F.GC.F.G

      582312




      582312




















          2 Answers
          2






          active

          oldest

          votes


















          7














          You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:



          documentclassarticle
          usepackagetikz
          usetikzlibrarypatterns
          begindocument
          begintikzpicture
          draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
          endtikzpicture
          enddocument


          Shape with pattern






          share|improve this answer























          • @CarLaTeX I do not understand what you mean!?

            – hpekristiansen
            Feb 3 at 10:15











          • @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

            – marmot
            Feb 3 at 16:22






          • 1





            @marmot Yes, path, lapsus!

            – CarLaTeX
            Feb 3 at 16:28











          • Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

            – C.F.G
            Feb 4 at 5:30











          • @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

            – hpekristiansen
            Feb 4 at 7:05


















          5














          documentclassarticle
          usepackagetikz

          begindocument

          begintikzpicture
          draw (-1,1) node (v1) circle (4.5);
          draw (v1) circle (2.5);

          fill[red](-5.5,1) arc (180:360:1 and .25)
          arc(180:0:2.5)
          arc (180:360:1 and .25)
          arc (0:180:4.5) ;
          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',
            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%2f473140%2fhow-to-add-patterns-inside-shapes-bounded-by-curves%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









            7














            You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:



            documentclassarticle
            usepackagetikz
            usetikzlibrarypatterns
            begindocument
            begintikzpicture
            draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
            endtikzpicture
            enddocument


            Shape with pattern






            share|improve this answer























            • @CarLaTeX I do not understand what you mean!?

              – hpekristiansen
              Feb 3 at 10:15











            • @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

              – marmot
              Feb 3 at 16:22






            • 1





              @marmot Yes, path, lapsus!

              – CarLaTeX
              Feb 3 at 16:28











            • Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

              – C.F.G
              Feb 4 at 5:30











            • @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

              – hpekristiansen
              Feb 4 at 7:05















            7














            You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:



            documentclassarticle
            usepackagetikz
            usetikzlibrarypatterns
            begindocument
            begintikzpicture
            draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
            endtikzpicture
            enddocument


            Shape with pattern






            share|improve this answer























            • @CarLaTeX I do not understand what you mean!?

              – hpekristiansen
              Feb 3 at 10:15











            • @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

              – marmot
              Feb 3 at 16:22






            • 1





              @marmot Yes, path, lapsus!

              – CarLaTeX
              Feb 3 at 16:28











            • Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

              – C.F.G
              Feb 4 at 5:30











            • @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

              – hpekristiansen
              Feb 4 at 7:05













            7












            7








            7







            You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:



            documentclassarticle
            usepackagetikz
            usetikzlibrarypatterns
            begindocument
            begintikzpicture
            draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
            endtikzpicture
            enddocument


            Shape with pattern






            share|improve this answer













            You need a closed shape to use patterns or fill. Shapes bounded by curves can be converted or redrawn like this:



            documentclassarticle
            usepackagetikz
            usetikzlibrarypatterns
            begindocument
            begintikzpicture
            draw[pattern=horizontal lines] (-5.5,1) arc (180:360:1 and .25) arc (180:360:2.5) arc (180:360:1 and .25) arc (0:-180:4.5) -- cycle;
            endtikzpicture
            enddocument


            Shape with pattern







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 3 at 7:55









            hpekristiansenhpekristiansen

            5,38362866




            5,38362866












            • @CarLaTeX I do not understand what you mean!?

              – hpekristiansen
              Feb 3 at 10:15











            • @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

              – marmot
              Feb 3 at 16:22






            • 1





              @marmot Yes, path, lapsus!

              – CarLaTeX
              Feb 3 at 16:28











            • Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

              – C.F.G
              Feb 4 at 5:30











            • @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

              – hpekristiansen
              Feb 4 at 7:05

















            • @CarLaTeX I do not understand what you mean!?

              – hpekristiansen
              Feb 3 at 10:15











            • @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

              – marmot
              Feb 3 at 16:22






            • 1





              @marmot Yes, path, lapsus!

              – CarLaTeX
              Feb 3 at 16:28











            • Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

              – C.F.G
              Feb 4 at 5:30











            • @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

              – hpekristiansen
              Feb 4 at 7:05
















            @CarLaTeX I do not understand what you mean!?

            – hpekristiansen
            Feb 3 at 10:15





            @CarLaTeX I do not understand what you mean!?

            – hpekristiansen
            Feb 3 at 10:15













            @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

            – marmot
            Feb 3 at 16:22





            @CarLaTeX You meant to say path[pattern=horizontal lines] ...? (fill also does what you want it to do but this is in a way an accident.)

            – marmot
            Feb 3 at 16:22




            1




            1





            @marmot Yes, path, lapsus!

            – CarLaTeX
            Feb 3 at 16:28





            @marmot Yes, path, lapsus!

            – CarLaTeX
            Feb 3 at 16:28













            Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

            – C.F.G
            Feb 4 at 5:30





            Thanks @hpekristiansen. Is it possible to increase number of horizontal lines?

            – C.F.G
            Feb 4 at 5:30













            @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

            – hpekristiansen
            Feb 4 at 7:05





            @C.F.G: Yes, but not easily. - see e.g. tex.stackexchange.com/questions/54358/…

            – hpekristiansen
            Feb 4 at 7:05











            5














            documentclassarticle
            usepackagetikz

            begindocument

            begintikzpicture
            draw (-1,1) node (v1) circle (4.5);
            draw (v1) circle (2.5);

            fill[red](-5.5,1) arc (180:360:1 and .25)
            arc(180:0:2.5)
            arc (180:360:1 and .25)
            arc (0:180:4.5) ;
            endtikzpicture
            enddocument


            enter image description here






            share|improve this answer



























              5














              documentclassarticle
              usepackagetikz

              begindocument

              begintikzpicture
              draw (-1,1) node (v1) circle (4.5);
              draw (v1) circle (2.5);

              fill[red](-5.5,1) arc (180:360:1 and .25)
              arc(180:0:2.5)
              arc (180:360:1 and .25)
              arc (0:180:4.5) ;
              endtikzpicture
              enddocument


              enter image description here






              share|improve this answer

























                5












                5








                5







                documentclassarticle
                usepackagetikz

                begindocument

                begintikzpicture
                draw (-1,1) node (v1) circle (4.5);
                draw (v1) circle (2.5);

                fill[red](-5.5,1) arc (180:360:1 and .25)
                arc(180:0:2.5)
                arc (180:360:1 and .25)
                arc (0:180:4.5) ;
                endtikzpicture
                enddocument


                enter image description here






                share|improve this answer













                documentclassarticle
                usepackagetikz

                begindocument

                begintikzpicture
                draw (-1,1) node (v1) circle (4.5);
                draw (v1) circle (2.5);

                fill[red](-5.5,1) arc (180:360:1 and .25)
                arc(180:0:2.5)
                arc (180:360:1 and .25)
                arc (0:180:4.5) ;
                endtikzpicture
                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 3 at 7:53









                Hafid BoukhouldaHafid Boukhoulda

                4,0471624




                4,0471624



























                    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%2f473140%2fhow-to-add-patterns-inside-shapes-bounded-by-curves%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay