I have very limited LaTeX knowledge. I am trying to plot the following figure using "tikz" and I appreciate if anyone can help me to finish plotting my figure. I did the following so far:



\draw (0,0) arc (0:180:6);
\draw   (-12,0)  - -(0,0);
\draw (-8,0) arc (0:180:2);
\draw (0,0) arc (0:180:4);
\draw (-6,-0.1) - - (-6,0.1);



There is a BIG semi-circle and two inner SMALL semi-circles. I want to label the right endpoint of the BIG semi-circle by "A" and the left endpoint of the BIG semi-circle by "B". I want to label the center of the BIG semi-circle by "O", and I want to label the point where the two SMALL semicircles meet by "P". I also want to shade the area inside the BIG semi-circle and outside the two SMALL semi-circles. I also want to mention on the figure that the radius of the big circle is: 6. and the distance between the point "O" and the point "P" is "x"

Any help is much appreciated

  • @Pleasedonttouch that's a bit too much meaning change for the title. Can you narrow down its focus? They are just semicircles – percusse Aug 2 '14 at 10:31
  • @Pleasedon'ttouch Yes but it's not your question title. Better consult the OP – percusse Aug 2 '14 at 12:38
  • @Pleasedon'ttouch Or you are testing his/her patience. – percusse Aug 2 '14 at 12:41
  • @percusse: I am testing your patience. :-) – kiss my armpit Aug 2 '14 at 12:43
  • @Pleasedon'ttouch That would take a while then. – percusse Aug 2 '14 at 13:52

You can also draw that path at one go so you don't need to fill white to restrict the fill if you have something else underneath it. And while you are at it you can also place the labels and coordinates too.

\filldraw[fill=blue] (0,0) 
               coordinate[label=-90:$B$] (B)
               arc (180:0:3cm) 
               coordinate[label=-90:$A$] (A)
               arc (0:180:2cm)
               coordinate[label=-90:$P$] (P)
               arc (0:180:1cm);
\draw (B)--(A) coordinate[midway,label=-90:$O$] (O);
\draw[decoration={brace,raise=5mm},decorate] (A) -- (O) 
                   node [midway,yshift=-6mm,below] (R) {$6$};
\draw[decoration={brace,raise=5mm},decorate] (O) -- (P)
                   node [midway,yshift=-6mm,below] (r) {$x$};

enter image description here

  • Shouldn't it be pathreplacing instead of pathmorphing in line 2 of your code? Correct me if I'm wrong. – AboAmmar Aug 2 '14 at 8:49
  • @AboAmmar Actually, it shouldn't even be there because it loads brace by default but you are right. I forgot to remove it from another example code. – percusse Aug 2 '14 at 9:37
  • I think no, it should be still there to draw the braces. There must be decorations.pathreplacing. – AboAmmar Aug 2 '14 at 10:48
  • @AboAmmar Try removing it. snake, brace and one other thing I don't remember is loaded by default. – percusse Aug 2 '14 at 10:51
  • @percusse- It doesn't work if I remove it. Does it work with you? – AboAmmar Aug 2 '14 at 11:06

Here is a quick attempt:



  \draw[fill=blue] (0,0)node[below]{$A$} arc (0:180:6) node[below]{$B$};
  \draw (-12,0) - -(0,0);
  \draw[fill=white] (-8,0) arc (0:180:2);
  \draw[fill=white] (0,0) arc (0:180:4)node[below]{$P$};
  \draw (-6,-0.1) -- node[below]{$O$} (-6,0.1);


This produces:

enter image description here

Note that colouring/filling is cumulative: you can fill one region with a colour and then fill another overlapping region with a different colour, or white to remove the colour. The last colour in any given region wins.


No arcs but with circles and clip.

\clip (-3.1,-0.5\pgflinewidth) rectangle (3,3.1);
\filldraw[fill=blue] (0,0)  circle (3cm);
\filldraw[fill=white] (1,0) circle (2cm);
\filldraw[fill=white] (-2,0) circle (1cm);
\draw (-3,-0.5\pgflinewidth)
        coordinate[label=-90:$B$] (B)
        -- (-1,-0.5\pgflinewidth) coordinate[label=-90:$P$] (P)
        --coordinate[pos=0.25,label=-90:$O$] (O)
        (3,-0.5\pgflinewidth)coordinate[label=-90:$A$] (A) ;
\draw[|<->|,yshift=-5mm] ([yshift=-5mm]A) -- ([yshift=-5mm]O)
                   node [midway,below] (R) {$6$};
\draw[|<->|] ([yshift=-5mm]O) -- ([yshift=-5mm]P)
                   node [midway,below] (r) {$x$};

enter image description here


A recommended solution (by me) with PSTricks.



enter image description here

  • 1
    The additional dots (to make the points clearer) are given free of charge. – kiss my armpit Aug 2 '14 at 12:28

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.