I am trying to draw this picture:

 circle intersecting a shaded non-uniform shape

I have tried a lot of things, like defining this

    \pgfextra {\pgfmathsetmacro\len{(#1)+rand*(#2)}}
    +(0:\len pt)
    \foreach \a in {10,20,...,120}{
        \pgfextra {\pgfmathsetmacro\len{(#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.


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

 \foreach \X in {0,...,11}
 \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$};

enter image description here

  • 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 Mar 26 at 4:29
  • 1
    @J.Rodriguez It's my pleasure and no need to put acknowledgments. – marmot Mar 26 at 4:30
  • 4
    @marmot should be in a lot of thesis. – manooooh Mar 26 at 4:40
  • @marmot Miss \mathcal{U}_1? :-) – Sebastiano Mar 26 at 11:05
  • 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 Mar 26 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.