[Tex/LaTex] Pacman circle in TikZ

tikz-pgf

I want to draw the Pacman circle on TikZ:

http://www.vectorstash.com/content/pac-man

Drawing a circle and filling in a color is easy; it's the mouth part that's troubling me. I can draw the two straight lines, but then I try to connect them with a curve using the [out=…,in=…] syntax and I can't get it to work. Is there an easier way to make this work?

What I've tried:

\begin{tikzpicture}
\path[fill=yellow] (2,1.1) to [out=30,in=150] (0,1.2) to [out=30,in=150] (2,1.3) -- (1,1.2) -- (2,1.1);
\end{tikzpicture}

Best Answer

edit:

consider Kpym comments let expanded one "paceman" to set of them with different orientation, size, rotation and colors....

enter image description here

\documentclass[tikz, margin=3mm]{standalone}
\usepackage{geometry}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}%[scale=...]
  \draw[thick,fill=yellow]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,0.66) circle (1.5mm);
\end{tikzpicture}\quad
\begin{tikzpicture}[xscale=-1]
  \draw[thick,fill=yellow]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}\quad 
\begin{tikzpicture}[scale=-1]
  \draw[thick,fill=yellow]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}\quad 
\begin{tikzpicture}[yscale=-1]
  \draw[thick,fill=yellow]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}\quad 
\begin{tikzpicture}[scale=0.75,rotate=-45]
  \draw[thick,fill=yellow!50!orange]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}\quad 
\begin{tikzpicture}[xscale=-0.75,yscale=0.75, rotate=45]
  \draw[thick,fill=orange]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}\quad 
\begin{tikzpicture}[scale=-0.75, rotate=90]
  \draw[thick,fill=olive]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
  \fill (0,2/3) circle (1.5mm);
\end{tikzpicture}
\end{document}

size and orientation of "pacman" (as you can see) you can adopt to your wishes with scaling with scale=..., xscale=..., yscale=..., rotate=... in any combination.

edit (2):

another idea is to define "paceman" as \newcommand and use it in document also out of tikzpicture environment:

 \documentclass{article}
\usepackage{geometry}
\usepackage{tikz}

\newcommand\pacman[2]{\tikz[baseline, #1]{%
    \draw[thick,fill=#2]
    (0,0) -- (30:1cm) arc (30:330:1cm) -- cycle;
    \fill (0,2/3) circle (1.5mm);}
                       } 
\begin{document}
\pacman{scale=1}{yellow}\quad
\pacman{xscale=-1}{yellow}\quad 
\pacman{scale=-1}{yellow}\quad
\pacman{yscale=-1}{yellow}\quad

\begin{tikzpicture}
\pacman{scale=0.75,rotate=-45}{yellow!50!orange}\quad 
\pacman{xscale=-0.75,yscale=0.75, rotate=45}{orange}
\end{tikzpicture}
 \end{document}

enter image description here

Related Question