I am using tikz for the first time and I don't know how to make this image. I can make the outline but not the patterned fill for the partial rectangle. What I want is: what I want What I can make is: what I get Here is my code for the tikz part:

\draw (-2,-0.535) -- (-2,4);
\draw (2,-0.535) -- (2,4);
\draw [dashed] (2,-4) -- (2,-0.535);
\draw [dashed] (-2,-4) -- (-2,-0.535);
\draw (-4,-4) -- (4,-4) arc(0:180:4) -- cycle;

1 Answer 1


Here is a possible way.

\begin{tikzpicture}[scale=4,dot/.style={in front of path,
    circle,draw,fill=white,inner sep=2pt},
    m/.style={text height=1.2em,text depth=0.25ex}]
\draw [dashed] (1/2,0) node[m,below]{$\frac{1}{2}$} -- (60:1) 
(-1/2,0) node[m,below]{$-\frac{1}{2}$} -- (120:1);
\draw (1,0) node[m,below]{$1$}   
    arc[start angle=0,end angle=180,radius=1]
    node[m,below]{$-1$}  -- cycle;
 (-1/2,2) -- (120:1) node[dot,label=above left:{$\rho^2$}]{}
 arc[start angle=120,end angle=60,radius=1]
 node[dot,label=above right:{$\rho=\mathrm{e}^{2\pi\mathrm{i}/6}$}]{}
 -- (1/2,2);

enter image description here

I switched to polar coordinates and use a scale factor to be able to use "natural" coordinates for \rho.

If you use an older versions of TikZ, i.e. before patterns.meta was added, use


and pattern=north east lines.

One can also use \clip to clip the relevant region.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .