How to draw a circle intersecting a shaded non-uniform shape using tikz?












6















I am trying to draw this picture:



 circle intersecting a shaded non-uniform shape



I have tried a lot of things, like defining this



newcommandirregularcircle[2]{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
+(0:len pt)
foreach a in {10,20,...,120}{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
-- +(a:len pt)
} -- cycle
}


But it don't give a figure that can be between the x-axis and the circle, and I don't know how to do this. Thanks.










share|improve this question

























  • Try tikzedt.org

    – sandu
    20 hours ago
















6















I am trying to draw this picture:



 circle intersecting a shaded non-uniform shape



I have tried a lot of things, like defining this



newcommandirregularcircle[2]{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
+(0:len pt)
foreach a in {10,20,...,120}{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
-- +(a:len pt)
} -- cycle
}


But it don't give a figure that can be between the x-axis and the circle, and I don't know how to do this. Thanks.










share|improve this question

























  • Try tikzedt.org

    – sandu
    20 hours ago














6












6








6








I am trying to draw this picture:



 circle intersecting a shaded non-uniform shape



I have tried a lot of things, like defining this



newcommandirregularcircle[2]{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
+(0:len pt)
foreach a in {10,20,...,120}{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
-- +(a:len pt)
} -- cycle
}


But it don't give a figure that can be between the x-axis and the circle, and I don't know how to do this. Thanks.










share|improve this question
















I am trying to draw this picture:



 circle intersecting a shaded non-uniform shape



I have tried a lot of things, like defining this



newcommandirregularcircle[2]{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
+(0:len pt)
foreach a in {10,20,...,120}{
pgfextra {pgfmathsetmacrolen{(#1)+rand*(#2)}}
-- +(a:len pt)
} -- cycle
}


But it don't give a figure that can be between the x-axis and the circle, and I don't know how to do this. Thanks.







tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 9 hours ago









JouleV

8,15222153




8,15222153










asked 20 hours ago









J.RodriguezJ.Rodriguez

1065




1065













  • Try tikzedt.org

    – sandu
    20 hours ago



















  • Try tikzedt.org

    – sandu
    20 hours ago

















Try tikzedt.org

– sandu
20 hours ago





Try tikzedt.org

– sandu
20 hours ago










1 Answer
1






active

oldest

votes


















17














One possibility is tp build up a random list and plots a smooth curve through it.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
pgfmathsetseed{9}
foreach X in {0,...,11}
{ifnumX=0
pgfmathsetmacro{myradius}{2}
xdefmyLst{myradius}
else
pgfmathsetmacro{myradius}{{myLst}[X-1]+0.5*(rnd-0.5)}
xdefmyLst{myLst,myradius}
fi}
xdefmyLst{myLst,2}
draw[pattern=north east lines] (2,0) --
plot[smooth,variable=x,samples at={0,...,12}]
([xshift=2cm]-x*10:{{myLst}[x]}) -- (-60:2) arc(-60:0:2);
draw (120:2) arc (120:-120:2);
draw[-latex] (0,0) -- (5,0);
draw[dashed] (2,0) -- (2,-pi);
draw (2,0) -- ++ (-120:pi);
draw[latex-latex] (2,0) + (-120:2.7) arc(-120:-90:2.7) node[midway,below]{$mu$};
draw[-latex] (2,0) -- ++ (-45:1) node[pos=1.2]{$z$};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer





















  • 8





    Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

    – J.Rodriguez
    20 hours ago






  • 1





    @J.Rodriguez It's my pleasure and no need to put acknowledgments.

    – marmot
    20 hours ago






  • 4





    @marmot should be in a lot of thesis.

    – manooooh
    19 hours ago











  • @marmot Miss mathcal{U}_1? :-)

    – Sebastiano
    13 hours ago






  • 1





    @Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

    – marmot
    8 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%2f481460%2fhow-to-draw-a-circle-intersecting-a-shaded-non-uniform-shape-using-tikz%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









17














One possibility is tp build up a random list and plots a smooth curve through it.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
pgfmathsetseed{9}
foreach X in {0,...,11}
{ifnumX=0
pgfmathsetmacro{myradius}{2}
xdefmyLst{myradius}
else
pgfmathsetmacro{myradius}{{myLst}[X-1]+0.5*(rnd-0.5)}
xdefmyLst{myLst,myradius}
fi}
xdefmyLst{myLst,2}
draw[pattern=north east lines] (2,0) --
plot[smooth,variable=x,samples at={0,...,12}]
([xshift=2cm]-x*10:{{myLst}[x]}) -- (-60:2) arc(-60:0:2);
draw (120:2) arc (120:-120:2);
draw[-latex] (0,0) -- (5,0);
draw[dashed] (2,0) -- (2,-pi);
draw (2,0) -- ++ (-120:pi);
draw[latex-latex] (2,0) + (-120:2.7) arc(-120:-90:2.7) node[midway,below]{$mu$};
draw[-latex] (2,0) -- ++ (-45:1) node[pos=1.2]{$z$};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer





















  • 8





    Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

    – J.Rodriguez
    20 hours ago






  • 1





    @J.Rodriguez It's my pleasure and no need to put acknowledgments.

    – marmot
    20 hours ago






  • 4





    @marmot should be in a lot of thesis.

    – manooooh
    19 hours ago











  • @marmot Miss mathcal{U}_1? :-)

    – Sebastiano
    13 hours ago






  • 1





    @Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

    – marmot
    8 hours ago
















17














One possibility is tp build up a random list and plots a smooth curve through it.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
pgfmathsetseed{9}
foreach X in {0,...,11}
{ifnumX=0
pgfmathsetmacro{myradius}{2}
xdefmyLst{myradius}
else
pgfmathsetmacro{myradius}{{myLst}[X-1]+0.5*(rnd-0.5)}
xdefmyLst{myLst,myradius}
fi}
xdefmyLst{myLst,2}
draw[pattern=north east lines] (2,0) --
plot[smooth,variable=x,samples at={0,...,12}]
([xshift=2cm]-x*10:{{myLst}[x]}) -- (-60:2) arc(-60:0:2);
draw (120:2) arc (120:-120:2);
draw[-latex] (0,0) -- (5,0);
draw[dashed] (2,0) -- (2,-pi);
draw (2,0) -- ++ (-120:pi);
draw[latex-latex] (2,0) + (-120:2.7) arc(-120:-90:2.7) node[midway,below]{$mu$};
draw[-latex] (2,0) -- ++ (-45:1) node[pos=1.2]{$z$};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer





















  • 8





    Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

    – J.Rodriguez
    20 hours ago






  • 1





    @J.Rodriguez It's my pleasure and no need to put acknowledgments.

    – marmot
    20 hours ago






  • 4





    @marmot should be in a lot of thesis.

    – manooooh
    19 hours ago











  • @marmot Miss mathcal{U}_1? :-)

    – Sebastiano
    13 hours ago






  • 1





    @Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

    – marmot
    8 hours ago














17












17








17







One possibility is tp build up a random list and plots a smooth curve through it.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
pgfmathsetseed{9}
foreach X in {0,...,11}
{ifnumX=0
pgfmathsetmacro{myradius}{2}
xdefmyLst{myradius}
else
pgfmathsetmacro{myradius}{{myLst}[X-1]+0.5*(rnd-0.5)}
xdefmyLst{myLst,myradius}
fi}
xdefmyLst{myLst,2}
draw[pattern=north east lines] (2,0) --
plot[smooth,variable=x,samples at={0,...,12}]
([xshift=2cm]-x*10:{{myLst}[x]}) -- (-60:2) arc(-60:0:2);
draw (120:2) arc (120:-120:2);
draw[-latex] (0,0) -- (5,0);
draw[dashed] (2,0) -- (2,-pi);
draw (2,0) -- ++ (-120:pi);
draw[latex-latex] (2,0) + (-120:2.7) arc(-120:-90:2.7) node[midway,below]{$mu$};
draw[-latex] (2,0) -- ++ (-45:1) node[pos=1.2]{$z$};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer















One possibility is tp build up a random list and plots a smooth curve through it.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
pgfmathsetseed{9}
foreach X in {0,...,11}
{ifnumX=0
pgfmathsetmacro{myradius}{2}
xdefmyLst{myradius}
else
pgfmathsetmacro{myradius}{{myLst}[X-1]+0.5*(rnd-0.5)}
xdefmyLst{myLst,myradius}
fi}
xdefmyLst{myLst,2}
draw[pattern=north east lines] (2,0) --
plot[smooth,variable=x,samples at={0,...,12}]
([xshift=2cm]-x*10:{{myLst}[x]}) -- (-60:2) arc(-60:0:2);
draw (120:2) arc (120:-120:2);
draw[-latex] (0,0) -- (5,0);
draw[dashed] (2,0) -- (2,-pi);
draw (2,0) -- ++ (-120:pi);
draw[latex-latex] (2,0) + (-120:2.7) arc(-120:-90:2.7) node[midway,below]{$mu$};
draw[-latex] (2,0) -- ++ (-45:1) node[pos=1.2]{$z$};
end{tikzpicture}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 19 hours ago

























answered 20 hours ago









marmotmarmot

112k5141267




112k5141267








  • 8





    Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

    – J.Rodriguez
    20 hours ago






  • 1





    @J.Rodriguez It's my pleasure and no need to put acknowledgments.

    – marmot
    20 hours ago






  • 4





    @marmot should be in a lot of thesis.

    – manooooh
    19 hours ago











  • @marmot Miss mathcal{U}_1? :-)

    – Sebastiano
    13 hours ago






  • 1





    @Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

    – marmot
    8 hours ago














  • 8





    Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

    – J.Rodriguez
    20 hours ago






  • 1





    @J.Rodriguez It's my pleasure and no need to put acknowledgments.

    – marmot
    20 hours ago






  • 4





    @marmot should be in a lot of thesis.

    – manooooh
    19 hours ago











  • @marmot Miss mathcal{U}_1? :-)

    – Sebastiano
    13 hours ago






  • 1





    @Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

    – marmot
    8 hours ago








8




8





Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

– J.Rodriguez
20 hours ago





Marmot, you are a tikz god. Its the 4th question that you answer to me. Thanks a lot. I will put you in my acknowledgments of the tesis.

– J.Rodriguez
20 hours ago




1




1





@J.Rodriguez It's my pleasure and no need to put acknowledgments.

– marmot
20 hours ago





@J.Rodriguez It's my pleasure and no need to put acknowledgments.

– marmot
20 hours ago




4




4





@marmot should be in a lot of thesis.

– manooooh
19 hours ago





@marmot should be in a lot of thesis.

– manooooh
19 hours ago













@marmot Miss mathcal{U}_1? :-)

– Sebastiano
13 hours ago





@marmot Miss mathcal{U}_1? :-)

– Sebastiano
13 hours ago




1




1





@Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

– marmot
8 hours ago





@Sebastiano I do not understand the comment. But please do not expect me to update my answer to add a U, there are several other things in the screen shot which I did not put in but the OP seems to be happy with it. This answer is only on the circle with some noise added on the radius.

– marmot
8 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%2f481460%2fhow-to-draw-a-circle-intersecting-a-shaded-non-uniform-shape-using-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







Popular posts from this blog

He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

Bunad

Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum