7

Can someone help me doing this

https://en.wikipedia.org/wiki/Circular_sector#/media/File:Circle_arc.svg

in TikZ? I would really appreciate any help.

I already tried inserting the image into my TeX file but it didn't work no matter what I tried, so I'd love to insert it as a TikZ-drawing.

Thank you very much.

2
  • You could convert the svg to pdf and then include it. Drawing it in TikZ wouldn't be too difficult, but you should really show what you attempted. Just asking people to recreate images for you without even sample code showing what you tried doesn't tend to get good results here.
    – TH.
    Commented Mar 30, 2018 at 1:48
  • i provide my tikz-attempts whenever there are some. however, my tikz-skills are purely based on copy&paste from tutorials and trying to making things work but it usually ends up being a big mess and i sit there for hours without any success. in this particular case, i could have barely managed to draw the circle and with some luck the radius r. i dont know if that would have been a big help. thanks for your consideration nonetheless.
    – Zest
    Commented Mar 30, 2018 at 2:09

2 Answers 2

13
\documentclass[tikz,border=5pt]{standalone}
\begin{document}
\begin{tikzpicture}[thick,font=\sffamily\Large]
\draw (0,0) circle (4cm);
\draw[very thick,fill=green!30] (0,0) --  (220:4) arc(220:120:4) -- cycle;
\draw[latex-latex]  (220:1.2) arc(220:120:1.2) node[midway,left]{$\theta$};
\draw[latex-latex]  (220:4.5) arc(220:120:4.5) node[midway,left]{L};
\draw (120:4) -- (120:4.5) (220:4) -- (220:4.5);
\draw[very thick,-latex] (0,0) --  (20:4) node[midway,above]{r};
\end{tikzpicture}
\end{document}

enter image description here

6
  • 1
    hello marmot, thank you very much! highly appreciating your effort and time
    – Zest
    Commented Mar 30, 2018 at 2:06
  • L and r are math quantities, they should be $L$ and $r$, I think.
    – Kpym
    Commented Mar 30, 2018 at 5:17
  • @Kpym I only wanted to provide a rather close reproduction of the linked picture.
    – user121799
    Commented Mar 30, 2018 at 5:23
  • @marmot If you really want this you should use $\mathrm{L}$ and $\mathrm{r}$.
    – Kpym
    Commented Mar 30, 2018 at 5:28
  • @Kpym If you ask me how I would label the distances, I would certainly use math mode. But this is not important here, I just tried to reproduce the OP's picture.
    – user121799
    Commented Mar 30, 2018 at 5:44
6
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{bending,arrows.meta}
\begin{document}

\begin{tikzpicture}[>={[inset=0,angle'=27]Stealth}]
\draw circle(2);
\draw [thick,fill=cyan!20](230:2)--(0,0)--(130:2) arc (130:230:2)--cycle;
\draw [->](0,0)--node[above]{$r$} (10:2);
\draw [|<->|](130:2.3) arc (130:230:2.3) node[left,pos=.5]{$L$};
\draw [<->]  (130:1)   arc (130:230:1)   node[left,pos=.5]{$\theta$};
\end{tikzpicture}

\end{document}

enter image description here

0

You must log in to answer this question.

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