Filling an area between two curvesHow to draw a decorated rectangle with rounded corners?TikZ: Cropping the Bounding BoxRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Area between curves tikzGraphics: Area between curvesFilling an area between curvesFill area between two curvesFilling the area between two circlesFilling Area between two Bezier Curves with tikzFill the area between two curves

Why doesn't a const reference extend the life of a temporary object passed via a function?

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

What causes the sudden spool-up sound from an F-16 when enabling afterburner?

Does the average primeness of natural numbers tend to zero?

Where else does the Shulchan Aruch quote an authority by name?

Denied boarding due to overcrowding, Sparpreis ticket. What are my rights?

extract characters between two commas?

Are cabin dividers used to "hide" the flex of the airplane?

Is there a way to make member function NOT callable from constructor?

Is there any use for defining additional entity types in a SOQL FROM clause?

Is every set a filtered colimit of finite sets?

Unbreakable Formation vs. Cry of the Carnarium

aging parents with no investments

map list to bin numbers

What does 'script /dev/null' do?

What does "enim et" mean?

How to move the player while also allowing forces to affect it

Calculate Levenshtein distance between two strings in Python

What is the meaning of "of trouble" in the following sentence?

Pristine Bit Checking

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

Copycat chess is back

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Is there a familial term for apples and pears?



Filling an area between two curves


How to draw a decorated rectangle with rounded corners?TikZ: Cropping the Bounding BoxRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Area between curves tikzGraphics: Area between curvesFilling an area between curvesFill area between two curvesFilling the area between two circlesFilling Area between two Bezier Curves with tikzFill the area between two curves













3















I would like to draw the following figure:
enter image description here



To do this I have used the following codes :



documentclass[10pt]article
usepackagepgf,tikz
usetikzlibraryarrows
pagestyleempty
begindocument

begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [rotate around=15.05:(6.07,0.75)] (6.07,0.75) ellipse (1.11cm and 0.56cm);
draw [rotate around=-13.74:(8.9,0.78)] (8.9,0.78) ellipse (1.07cm and 0.53cm);
draw (4.58,2.02)-- (11,2);
draw (11,2)-- (10.48,-1);
draw (10.48,-1)-- (4,-1);
draw (4,-1)-- (4.58,2.02);
draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
draw [rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
draw [rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
draw [->] (8.96,6.46) -- (8.8,1.62);
draw [->] (6.7,6.38) -- (6.46,1.62);
draw [->] (7.3,0.98) -- (7.76,0.98);


draw (9.54,9.82) node $M$;
draw (6.8,7.3) node $U_i$;
draw (8.8,7.3) node $U_j$;
draw (6.24,4.34) node $psi_i$;
draw (9.52,4.2) node $psi_j$;
draw (8.94,-1.3) node $mathbfR^n$;
draw (7.6,0) node $psi_jcirc psi_i^-1$;

endtikzpicture
enddocument


It produces:
enter image description here



How can I shade this figure?










share|improve this question




























    3















    I would like to draw the following figure:
    enter image description here



    To do this I have used the following codes :



    documentclass[10pt]article
    usepackagepgf,tikz
    usetikzlibraryarrows
    pagestyleempty
    begindocument

    begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
    draw [rotate around=15.05:(6.07,0.75)] (6.07,0.75) ellipse (1.11cm and 0.56cm);
    draw [rotate around=-13.74:(8.9,0.78)] (8.9,0.78) ellipse (1.07cm and 0.53cm);
    draw (4.58,2.02)-- (11,2);
    draw (11,2)-- (10.48,-1);
    draw (10.48,-1)-- (4,-1);
    draw (4,-1)-- (4.58,2.02);
    draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
    draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
    draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
    draw [rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
    draw [rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
    draw [->] (8.96,6.46) -- (8.8,1.62);
    draw [->] (6.7,6.38) -- (6.46,1.62);
    draw [->] (7.3,0.98) -- (7.76,0.98);


    draw (9.54,9.82) node $M$;
    draw (6.8,7.3) node $U_i$;
    draw (8.8,7.3) node $U_j$;
    draw (6.24,4.34) node $psi_i$;
    draw (9.52,4.2) node $psi_j$;
    draw (8.94,-1.3) node $mathbfR^n$;
    draw (7.6,0) node $psi_jcirc psi_i^-1$;

    endtikzpicture
    enddocument


    It produces:
    enter image description here



    How can I shade this figure?










    share|improve this question


























      3












      3








      3








      I would like to draw the following figure:
      enter image description here



      To do this I have used the following codes :



      documentclass[10pt]article
      usepackagepgf,tikz
      usetikzlibraryarrows
      pagestyleempty
      begindocument

      begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
      draw [rotate around=15.05:(6.07,0.75)] (6.07,0.75) ellipse (1.11cm and 0.56cm);
      draw [rotate around=-13.74:(8.9,0.78)] (8.9,0.78) ellipse (1.07cm and 0.53cm);
      draw (4.58,2.02)-- (11,2);
      draw (11,2)-- (10.48,-1);
      draw (10.48,-1)-- (4,-1);
      draw (4,-1)-- (4.58,2.02);
      draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
      draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
      draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
      draw [rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
      draw [rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
      draw [->] (8.96,6.46) -- (8.8,1.62);
      draw [->] (6.7,6.38) -- (6.46,1.62);
      draw [->] (7.3,0.98) -- (7.76,0.98);


      draw (9.54,9.82) node $M$;
      draw (6.8,7.3) node $U_i$;
      draw (8.8,7.3) node $U_j$;
      draw (6.24,4.34) node $psi_i$;
      draw (9.52,4.2) node $psi_j$;
      draw (8.94,-1.3) node $mathbfR^n$;
      draw (7.6,0) node $psi_jcirc psi_i^-1$;

      endtikzpicture
      enddocument


      It produces:
      enter image description here



      How can I shade this figure?










      share|improve this question
















      I would like to draw the following figure:
      enter image description here



      To do this I have used the following codes :



      documentclass[10pt]article
      usepackagepgf,tikz
      usetikzlibraryarrows
      pagestyleempty
      begindocument

      begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
      draw [rotate around=15.05:(6.07,0.75)] (6.07,0.75) ellipse (1.11cm and 0.56cm);
      draw [rotate around=-13.74:(8.9,0.78)] (8.9,0.78) ellipse (1.07cm and 0.53cm);
      draw (4.58,2.02)-- (11,2);
      draw (11,2)-- (10.48,-1);
      draw (10.48,-1)-- (4,-1);
      draw (4,-1)-- (4.58,2.02);
      draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
      draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
      draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
      draw [rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
      draw [rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
      draw [->] (8.96,6.46) -- (8.8,1.62);
      draw [->] (6.7,6.38) -- (6.46,1.62);
      draw [->] (7.3,0.98) -- (7.76,0.98);


      draw (9.54,9.82) node $M$;
      draw (6.8,7.3) node $U_i$;
      draw (8.8,7.3) node $U_j$;
      draw (6.24,4.34) node $psi_i$;
      draw (9.52,4.2) node $psi_j$;
      draw (8.94,-1.3) node $mathbfR^n$;
      draw (7.6,0) node $psi_jcirc psi_i^-1$;

      endtikzpicture
      enddocument


      It produces:
      enter image description here



      How can I shade this figure?







      tikz-pgf tikz-3dplot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 hours ago







      MKS

















      asked 3 hours ago









      MKSMKS

      834




      834




















          1 Answer
          1






          active

          oldest

          votes


















          3














          There are two basic tricks that allow you to fill the area bounded by two different curves/contours:



          1. clip against one curve and fill the other;

          2. use even odd rule.

          And there are combinations of the two and other possibilities. This answer focuses on possibility 1. Then there is the question how on could recycle curves for the fill. Out of several possibilities, this answer will utilize the use path trick in the first part and insert path in the second path.



          The first path modifies your code such as to shade the correct (?) areas.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows
          makeatletter % https://tex.stackexchange.com/a/38995/121799
          tikzset
          use path/.code=pgfsyssoftpath@setcurrentpath#1

          makeatother

          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
          draw [rotate around=15.05:(6.07,0.75),save path=pathA] (6.07,0.75) ellipse (1.11cm and 0.56cm);
          draw [rotate around=-13.74:(8.9,0.78),save path=pathB] (8.9,0.78) ellipse (1.07cm and 0.53cm);
          draw (4.58,2.02)-- (11,2);
          draw (11,2)-- (10.48,-1);
          draw (10.48,-1)-- (4,-1);
          draw (4,-1)-- (4.58,2.02);
          draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
          draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
          draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
          draw [save path=pathC,rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
          draw [save path=pathD,rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
          draw [->] (8.96,6.46) -- (8.8,1.62);
          draw [->] (6.7,6.38) -- (6.46,1.62);
          draw [->] (7.3,0.98) -- (7.76,0.98);


          draw (9.54,9.82) node $M$;
          draw (6.8,7.3) node $U_i$;
          draw (8.8,7.3) node $U_j$;
          draw (6.24,4.34) node $psi_i$;
          draw (9.52,4.2) node $psi_j$;
          draw (8.94,-1.3) node $mathbfR^n$;
          draw (7.6,0) node $psi_jcirc psi_i^-1$;
          beginscope
          clip[use path=pathA];
          path[fill=blue,shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r))
          -- ++ (1,0) |- cycle;
          endscope
          beginscope
          clip[use path=pathB];
          path[fill=blue,shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r))
          -- ++ (-1,0) |- cycle;
          endscope
          clip[use path=pathC];
          fill[blue,use path=pathD];
          endtikzpicture
          enddocument


          enter image description here



          However, I am wondering if you are willing to consider an arguably simpler code yielding a similar picture. Advantages include more relative positioning such that you can move complete parts around without having to redo all coordinates.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows,patterns
          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle
          45,x=1.0cm,y=1.0cm,standard ellipse around/.style args=#1 rotated by #2%
          insert path=[rotate around=#2:#1] #1 circle[x radius=1.2cm,y radius=0.6cm]]
          beginscope[yshift=6.5cm]
          draw (0,0) circle[x radius=3.5cm,y radius=1.9cm];
          node at (2,2.3) $M$;
          draw (-0.7,-0.2) node[left] (Ui) $U_i$
          [standard ellipse around=(-0.7,-0.2) rotated by 15];
          draw (0.7,-0.2) node[right] (Uj) $U_i$
          [standard ellipse around=(0.7,-0.2) rotated by -15];
          clip[standard ellipse around=(0.7,-0.2) rotated by -15];
          path[pattern=north east lines,
          standard ellipse around=(-0.7,-0.2) rotated by 15];
          endscope
          beginscope[local bounding box=b]
          beginscope[xshift=-4mm,local bounding box=bl]
          draw[clip,standard ellipse around=(-1.2,0) rotated by 15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by -15];
          endscope
          beginscope[xshift=4mm,local bounding box=br]
          draw[clip,standard ellipse around=(1.2,0) rotated by -15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by 15];
          endscope
          draw [->] (bl) -- (br) node[midway,below=8mm]$psi_jcirc psi_i^-1$;
          endscope
          draw[->] ([yshift=-0.5cm]Ui.south) -- ([yshift=2mm]bl.north-|Ui.south)
          node[midway,left]$psi_i$;
          draw[->] ([yshift=-0.5cm]Uj.south) -- ([yshift=2mm]br.north-|Uj.south)
          node[midway,right]$psi_j$;
          draw ([xshift=-1.5cm,yshift=-1cm]b.south west)
          -- ([xshift=-1cm,yshift=1cm]b.north west)
          -- ([xshift=1.5cm,yshift=1cm]b.north east)
          -- ([xshift=1cm,yshift=-1cm]b.south east) -- cycle;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • Thank you very much for your answer@marmot

            – MKS
            14 mins ago












          • @MKS You're welcome!

            – marmot
            11 mins 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%2f483892%2ffilling-an-area-between-two-curves%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          There are two basic tricks that allow you to fill the area bounded by two different curves/contours:



          1. clip against one curve and fill the other;

          2. use even odd rule.

          And there are combinations of the two and other possibilities. This answer focuses on possibility 1. Then there is the question how on could recycle curves for the fill. Out of several possibilities, this answer will utilize the use path trick in the first part and insert path in the second path.



          The first path modifies your code such as to shade the correct (?) areas.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows
          makeatletter % https://tex.stackexchange.com/a/38995/121799
          tikzset
          use path/.code=pgfsyssoftpath@setcurrentpath#1

          makeatother

          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
          draw [rotate around=15.05:(6.07,0.75),save path=pathA] (6.07,0.75) ellipse (1.11cm and 0.56cm);
          draw [rotate around=-13.74:(8.9,0.78),save path=pathB] (8.9,0.78) ellipse (1.07cm and 0.53cm);
          draw (4.58,2.02)-- (11,2);
          draw (11,2)-- (10.48,-1);
          draw (10.48,-1)-- (4,-1);
          draw (4,-1)-- (4.58,2.02);
          draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
          draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
          draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
          draw [save path=pathC,rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
          draw [save path=pathD,rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
          draw [->] (8.96,6.46) -- (8.8,1.62);
          draw [->] (6.7,6.38) -- (6.46,1.62);
          draw [->] (7.3,0.98) -- (7.76,0.98);


          draw (9.54,9.82) node $M$;
          draw (6.8,7.3) node $U_i$;
          draw (8.8,7.3) node $U_j$;
          draw (6.24,4.34) node $psi_i$;
          draw (9.52,4.2) node $psi_j$;
          draw (8.94,-1.3) node $mathbfR^n$;
          draw (7.6,0) node $psi_jcirc psi_i^-1$;
          beginscope
          clip[use path=pathA];
          path[fill=blue,shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r))
          -- ++ (1,0) |- cycle;
          endscope
          beginscope
          clip[use path=pathB];
          path[fill=blue,shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r))
          -- ++ (-1,0) |- cycle;
          endscope
          clip[use path=pathC];
          fill[blue,use path=pathD];
          endtikzpicture
          enddocument


          enter image description here



          However, I am wondering if you are willing to consider an arguably simpler code yielding a similar picture. Advantages include more relative positioning such that you can move complete parts around without having to redo all coordinates.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows,patterns
          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle
          45,x=1.0cm,y=1.0cm,standard ellipse around/.style args=#1 rotated by #2%
          insert path=[rotate around=#2:#1] #1 circle[x radius=1.2cm,y radius=0.6cm]]
          beginscope[yshift=6.5cm]
          draw (0,0) circle[x radius=3.5cm,y radius=1.9cm];
          node at (2,2.3) $M$;
          draw (-0.7,-0.2) node[left] (Ui) $U_i$
          [standard ellipse around=(-0.7,-0.2) rotated by 15];
          draw (0.7,-0.2) node[right] (Uj) $U_i$
          [standard ellipse around=(0.7,-0.2) rotated by -15];
          clip[standard ellipse around=(0.7,-0.2) rotated by -15];
          path[pattern=north east lines,
          standard ellipse around=(-0.7,-0.2) rotated by 15];
          endscope
          beginscope[local bounding box=b]
          beginscope[xshift=-4mm,local bounding box=bl]
          draw[clip,standard ellipse around=(-1.2,0) rotated by 15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by -15];
          endscope
          beginscope[xshift=4mm,local bounding box=br]
          draw[clip,standard ellipse around=(1.2,0) rotated by -15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by 15];
          endscope
          draw [->] (bl) -- (br) node[midway,below=8mm]$psi_jcirc psi_i^-1$;
          endscope
          draw[->] ([yshift=-0.5cm]Ui.south) -- ([yshift=2mm]bl.north-|Ui.south)
          node[midway,left]$psi_i$;
          draw[->] ([yshift=-0.5cm]Uj.south) -- ([yshift=2mm]br.north-|Uj.south)
          node[midway,right]$psi_j$;
          draw ([xshift=-1.5cm,yshift=-1cm]b.south west)
          -- ([xshift=-1cm,yshift=1cm]b.north west)
          -- ([xshift=1.5cm,yshift=1cm]b.north east)
          -- ([xshift=1cm,yshift=-1cm]b.south east) -- cycle;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • Thank you very much for your answer@marmot

            – MKS
            14 mins ago












          • @MKS You're welcome!

            – marmot
            11 mins ago















          3














          There are two basic tricks that allow you to fill the area bounded by two different curves/contours:



          1. clip against one curve and fill the other;

          2. use even odd rule.

          And there are combinations of the two and other possibilities. This answer focuses on possibility 1. Then there is the question how on could recycle curves for the fill. Out of several possibilities, this answer will utilize the use path trick in the first part and insert path in the second path.



          The first path modifies your code such as to shade the correct (?) areas.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows
          makeatletter % https://tex.stackexchange.com/a/38995/121799
          tikzset
          use path/.code=pgfsyssoftpath@setcurrentpath#1

          makeatother

          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
          draw [rotate around=15.05:(6.07,0.75),save path=pathA] (6.07,0.75) ellipse (1.11cm and 0.56cm);
          draw [rotate around=-13.74:(8.9,0.78),save path=pathB] (8.9,0.78) ellipse (1.07cm and 0.53cm);
          draw (4.58,2.02)-- (11,2);
          draw (11,2)-- (10.48,-1);
          draw (10.48,-1)-- (4,-1);
          draw (4,-1)-- (4.58,2.02);
          draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
          draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
          draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
          draw [save path=pathC,rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
          draw [save path=pathD,rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
          draw [->] (8.96,6.46) -- (8.8,1.62);
          draw [->] (6.7,6.38) -- (6.46,1.62);
          draw [->] (7.3,0.98) -- (7.76,0.98);


          draw (9.54,9.82) node $M$;
          draw (6.8,7.3) node $U_i$;
          draw (8.8,7.3) node $U_j$;
          draw (6.24,4.34) node $psi_i$;
          draw (9.52,4.2) node $psi_j$;
          draw (8.94,-1.3) node $mathbfR^n$;
          draw (7.6,0) node $psi_jcirc psi_i^-1$;
          beginscope
          clip[use path=pathA];
          path[fill=blue,shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r))
          -- ++ (1,0) |- cycle;
          endscope
          beginscope
          clip[use path=pathB];
          path[fill=blue,shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r))
          -- ++ (-1,0) |- cycle;
          endscope
          clip[use path=pathC];
          fill[blue,use path=pathD];
          endtikzpicture
          enddocument


          enter image description here



          However, I am wondering if you are willing to consider an arguably simpler code yielding a similar picture. Advantages include more relative positioning such that you can move complete parts around without having to redo all coordinates.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows,patterns
          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle
          45,x=1.0cm,y=1.0cm,standard ellipse around/.style args=#1 rotated by #2%
          insert path=[rotate around=#2:#1] #1 circle[x radius=1.2cm,y radius=0.6cm]]
          beginscope[yshift=6.5cm]
          draw (0,0) circle[x radius=3.5cm,y radius=1.9cm];
          node at (2,2.3) $M$;
          draw (-0.7,-0.2) node[left] (Ui) $U_i$
          [standard ellipse around=(-0.7,-0.2) rotated by 15];
          draw (0.7,-0.2) node[right] (Uj) $U_i$
          [standard ellipse around=(0.7,-0.2) rotated by -15];
          clip[standard ellipse around=(0.7,-0.2) rotated by -15];
          path[pattern=north east lines,
          standard ellipse around=(-0.7,-0.2) rotated by 15];
          endscope
          beginscope[local bounding box=b]
          beginscope[xshift=-4mm,local bounding box=bl]
          draw[clip,standard ellipse around=(-1.2,0) rotated by 15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by -15];
          endscope
          beginscope[xshift=4mm,local bounding box=br]
          draw[clip,standard ellipse around=(1.2,0) rotated by -15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by 15];
          endscope
          draw [->] (bl) -- (br) node[midway,below=8mm]$psi_jcirc psi_i^-1$;
          endscope
          draw[->] ([yshift=-0.5cm]Ui.south) -- ([yshift=2mm]bl.north-|Ui.south)
          node[midway,left]$psi_i$;
          draw[->] ([yshift=-0.5cm]Uj.south) -- ([yshift=2mm]br.north-|Uj.south)
          node[midway,right]$psi_j$;
          draw ([xshift=-1.5cm,yshift=-1cm]b.south west)
          -- ([xshift=-1cm,yshift=1cm]b.north west)
          -- ([xshift=1.5cm,yshift=1cm]b.north east)
          -- ([xshift=1cm,yshift=-1cm]b.south east) -- cycle;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • Thank you very much for your answer@marmot

            – MKS
            14 mins ago












          • @MKS You're welcome!

            – marmot
            11 mins ago













          3












          3








          3







          There are two basic tricks that allow you to fill the area bounded by two different curves/contours:



          1. clip against one curve and fill the other;

          2. use even odd rule.

          And there are combinations of the two and other possibilities. This answer focuses on possibility 1. Then there is the question how on could recycle curves for the fill. Out of several possibilities, this answer will utilize the use path trick in the first part and insert path in the second path.



          The first path modifies your code such as to shade the correct (?) areas.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows
          makeatletter % https://tex.stackexchange.com/a/38995/121799
          tikzset
          use path/.code=pgfsyssoftpath@setcurrentpath#1

          makeatother

          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
          draw [rotate around=15.05:(6.07,0.75),save path=pathA] (6.07,0.75) ellipse (1.11cm and 0.56cm);
          draw [rotate around=-13.74:(8.9,0.78),save path=pathB] (8.9,0.78) ellipse (1.07cm and 0.53cm);
          draw (4.58,2.02)-- (11,2);
          draw (11,2)-- (10.48,-1);
          draw (10.48,-1)-- (4,-1);
          draw (4,-1)-- (4.58,2.02);
          draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
          draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
          draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
          draw [save path=pathC,rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
          draw [save path=pathD,rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
          draw [->] (8.96,6.46) -- (8.8,1.62);
          draw [->] (6.7,6.38) -- (6.46,1.62);
          draw [->] (7.3,0.98) -- (7.76,0.98);


          draw (9.54,9.82) node $M$;
          draw (6.8,7.3) node $U_i$;
          draw (8.8,7.3) node $U_j$;
          draw (6.24,4.34) node $psi_i$;
          draw (9.52,4.2) node $psi_j$;
          draw (8.94,-1.3) node $mathbfR^n$;
          draw (7.6,0) node $psi_jcirc psi_i^-1$;
          beginscope
          clip[use path=pathA];
          path[fill=blue,shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r))
          -- ++ (1,0) |- cycle;
          endscope
          beginscope
          clip[use path=pathB];
          path[fill=blue,shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r))
          -- ++ (-1,0) |- cycle;
          endscope
          clip[use path=pathC];
          fill[blue,use path=pathD];
          endtikzpicture
          enddocument


          enter image description here



          However, I am wondering if you are willing to consider an arguably simpler code yielding a similar picture. Advantages include more relative positioning such that you can move complete parts around without having to redo all coordinates.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows,patterns
          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle
          45,x=1.0cm,y=1.0cm,standard ellipse around/.style args=#1 rotated by #2%
          insert path=[rotate around=#2:#1] #1 circle[x radius=1.2cm,y radius=0.6cm]]
          beginscope[yshift=6.5cm]
          draw (0,0) circle[x radius=3.5cm,y radius=1.9cm];
          node at (2,2.3) $M$;
          draw (-0.7,-0.2) node[left] (Ui) $U_i$
          [standard ellipse around=(-0.7,-0.2) rotated by 15];
          draw (0.7,-0.2) node[right] (Uj) $U_i$
          [standard ellipse around=(0.7,-0.2) rotated by -15];
          clip[standard ellipse around=(0.7,-0.2) rotated by -15];
          path[pattern=north east lines,
          standard ellipse around=(-0.7,-0.2) rotated by 15];
          endscope
          beginscope[local bounding box=b]
          beginscope[xshift=-4mm,local bounding box=bl]
          draw[clip,standard ellipse around=(-1.2,0) rotated by 15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by -15];
          endscope
          beginscope[xshift=4mm,local bounding box=br]
          draw[clip,standard ellipse around=(1.2,0) rotated by -15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by 15];
          endscope
          draw [->] (bl) -- (br) node[midway,below=8mm]$psi_jcirc psi_i^-1$;
          endscope
          draw[->] ([yshift=-0.5cm]Ui.south) -- ([yshift=2mm]bl.north-|Ui.south)
          node[midway,left]$psi_i$;
          draw[->] ([yshift=-0.5cm]Uj.south) -- ([yshift=2mm]br.north-|Uj.south)
          node[midway,right]$psi_j$;
          draw ([xshift=-1.5cm,yshift=-1cm]b.south west)
          -- ([xshift=-1cm,yshift=1cm]b.north west)
          -- ([xshift=1.5cm,yshift=1cm]b.north east)
          -- ([xshift=1cm,yshift=-1cm]b.south east) -- cycle;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer















          There are two basic tricks that allow you to fill the area bounded by two different curves/contours:



          1. clip against one curve and fill the other;

          2. use even odd rule.

          And there are combinations of the two and other possibilities. This answer focuses on possibility 1. Then there is the question how on could recycle curves for the fill. Out of several possibilities, this answer will utilize the use path trick in the first part and insert path in the second path.



          The first path modifies your code such as to shade the correct (?) areas.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows
          makeatletter % https://tex.stackexchange.com/a/38995/121799
          tikzset
          use path/.code=pgfsyssoftpath@setcurrentpath#1

          makeatother

          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
          draw [rotate around=15.05:(6.07,0.75),save path=pathA] (6.07,0.75) ellipse (1.11cm and 0.56cm);
          draw [rotate around=-13.74:(8.9,0.78),save path=pathB] (8.9,0.78) ellipse (1.07cm and 0.53cm);
          draw (4.58,2.02)-- (11,2);
          draw (11,2)-- (10.48,-1);
          draw (10.48,-1)-- (4,-1);
          draw (4,-1)-- (4.58,2.02);
          draw [shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r));
          draw [shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r));
          draw [rotate around=-3.74:(8.09,7.47)] (8.09,7.47) ellipse (3.48cm and 1.89cm);
          draw [save path=pathC,rotate around=13.37:(7.03,7.4)] (7.03,7.4) ellipse (1.2cm and 0.59cm);
          draw [save path=pathD,rotate around=-18.43:(8.48,7.38)] (8.48,7.38) ellipse (1.23cm and 0.59cm);
          draw [->] (8.96,6.46) -- (8.8,1.62);
          draw [->] (6.7,6.38) -- (6.46,1.62);
          draw [->] (7.3,0.98) -- (7.76,0.98);


          draw (9.54,9.82) node $M$;
          draw (6.8,7.3) node $U_i$;
          draw (8.8,7.3) node $U_j$;
          draw (6.24,4.34) node $psi_i$;
          draw (9.52,4.2) node $psi_j$;
          draw (8.94,-1.3) node $mathbfR^n$;
          draw (7.6,0) node $psi_jcirc psi_i^-1$;
          beginscope
          clip[use path=pathA];
          path[fill=blue,shift=(6.76,0.91)] plot[domain=1.71:4.85,variable=t](1*0.43*cos(t r)+0*0.43*sin(t r),0*0.43*cos(t r)+1*0.43*sin(t r))
          -- ++ (1,0) |- cycle;
          endscope
          beginscope
          clip[use path=pathB];
          path[fill=blue,shift=(8.25,0.9)] plot[domain=-1.6:1.54,variable=t](1*0.42*cos(t r)+0*0.42*sin(t r),0*0.42*cos(t r)+1*0.42*sin(t r))
          -- ++ (-1,0) |- cycle;
          endscope
          clip[use path=pathC];
          fill[blue,use path=pathD];
          endtikzpicture
          enddocument


          enter image description here



          However, I am wondering if you are willing to consider an arguably simpler code yielding a similar picture. Advantages include more relative positioning such that you can move complete parts around without having to redo all coordinates.



          documentclass[10pt]article
          usepackagetikz
          usetikzlibraryarrows,patterns
          pagestyleempty
          begindocument

          begintikzpicture[line cap=round,line join=round,>=triangle
          45,x=1.0cm,y=1.0cm,standard ellipse around/.style args=#1 rotated by #2%
          insert path=[rotate around=#2:#1] #1 circle[x radius=1.2cm,y radius=0.6cm]]
          beginscope[yshift=6.5cm]
          draw (0,0) circle[x radius=3.5cm,y radius=1.9cm];
          node at (2,2.3) $M$;
          draw (-0.7,-0.2) node[left] (Ui) $U_i$
          [standard ellipse around=(-0.7,-0.2) rotated by 15];
          draw (0.7,-0.2) node[right] (Uj) $U_i$
          [standard ellipse around=(0.7,-0.2) rotated by -15];
          clip[standard ellipse around=(0.7,-0.2) rotated by -15];
          path[pattern=north east lines,
          standard ellipse around=(-0.7,-0.2) rotated by 15];
          endscope
          beginscope[local bounding box=b]
          beginscope[xshift=-4mm,local bounding box=bl]
          draw[clip,standard ellipse around=(-1.2,0) rotated by 15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by -15];
          endscope
          beginscope[xshift=4mm,local bounding box=br]
          draw[clip,standard ellipse around=(1.2,0) rotated by -15];
          draw[pattern=north east lines,standard ellipse around=(0,0) rotated by 15];
          endscope
          draw [->] (bl) -- (br) node[midway,below=8mm]$psi_jcirc psi_i^-1$;
          endscope
          draw[->] ([yshift=-0.5cm]Ui.south) -- ([yshift=2mm]bl.north-|Ui.south)
          node[midway,left]$psi_i$;
          draw[->] ([yshift=-0.5cm]Uj.south) -- ([yshift=2mm]br.north-|Uj.south)
          node[midway,right]$psi_j$;
          draw ([xshift=-1.5cm,yshift=-1cm]b.south west)
          -- ([xshift=-1cm,yshift=1cm]b.north west)
          -- ([xshift=1.5cm,yshift=1cm]b.north east)
          -- ([xshift=1cm,yshift=-1cm]b.south east) -- cycle;
          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 47 mins ago

























          answered 2 hours ago









          marmotmarmot

          116k5147277




          116k5147277












          • Thank you very much for your answer@marmot

            – MKS
            14 mins ago












          • @MKS You're welcome!

            – marmot
            11 mins ago

















          • Thank you very much for your answer@marmot

            – MKS
            14 mins ago












          • @MKS You're welcome!

            – marmot
            11 mins ago
















          Thank you very much for your answer@marmot

          – MKS
          14 mins ago






          Thank you very much for your answer@marmot

          – MKS
          14 mins ago














          @MKS You're welcome!

          – marmot
          11 mins ago





          @MKS You're welcome!

          – marmot
          11 mins 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%2f483892%2ffilling-an-area-between-two-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

          Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

          2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

          Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?