9

The code below is my attempt. It results in a shape that is drawn in black, but the code below does not fill it in correctly.

\documentclass{article}

\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}
        \filldraw[fill=green!20, draw=black]
        (8,0) -- (8,8) arc (0:-30:8cm) (8,0) arc(0:30:8cm);
    \end{tikzpicture}
\end{document}

arc and line

Would like some guidance on fixing this up. I believe it's the way I'm using the draw commands but I am not sure how to fix it.

1
  • Nice first post. Welcome!
    – A Feldman
    Jan 31 '18 at 4:20
9

You should not move the drawing pen to the point (8,0). Draw the arc at once (from 30 degrees to 0). This code does what you need.

\documentclass{article}

\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}
        \filldraw[fill=green!20, draw=black]
        (8,0) -- (8,8) arc (0:-30:8cm)  arc(30:0:8cm);
    \end{tikzpicture}
\end{document}

enter image description here

Your Answer

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