[Tex/LaTex] Sketching an acoustic scenario (head and loudspeakers) in TikZ

tikz-pgf

I am interested in sketching a very common graphical scenario used in acoustic and audio research in Tikz. Essentially, it consists of a sketched head in the center and one or more loudspeakers around the head at different angles.

Something like this (I'm just talking about the idea, not the specific details):

enter image description here

I managed to get something done, but I am not very pleased with the result for two reasons:

  1. I cannot make the option minimum height for the rectangle on top of the trapezium and, therefore, had to use scale to make it thinner

  2. I don't like the fact that I have to manually adjust the x and y shifts of the rectangle after rotation.

Is there an easy way to parameterize the rotation of the whole loudspeaker symbol?

Thanks in advance! Here's the MWE (for some reason I can't externalize the image in PNG :/)

\documentclass{article}
\usepackage[mode=buildnew]{standalone}% requires -shell-escape

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{plot coordinates/math parser=false}
\usepackage{tikz}                       %inline graphics
\usetikzlibrary{plotmarks,dsp,chains,calc,shapes.geometric}
\usetikzlibrary{hobby,backgrounds,trees,snakes,shapes.callouts,positioning,pgfplots.groupplots}


\begin{document}

    %
    \begin{tikzpicture}[anchor=center,remember picture,overlay]
        %\*
        % Head
        \node[thick,circle,minimum size=1.25cm,draw] at (0,0)
          (head) {};
        \draw [thick,] ([xshift=-3pt,yshift=-0.9pt]head.north) -- ([yshift=5pt]head.north) -- ([xshift=3pt,yshift=-0.9pt]head.north);
        % Circle
        \node[thick,dashed,circle,minimum size=3.0cm,draw] at (0,0)
          (ah) {};      
        % LS at 0deg
        \node[draw,thick,fill=gray,trapezium,minimum width=10pt,shape border rotate=0,shape border uses incircle] at ($(ah)+(90:1.5cm)$)  (ls1) {};
        \node[scale=0.75,draw,thick,fill=gray,minimum width=14pt] at ($(ls1.north)+(0,1.5pt)$)  (ls12) {};
        % LS at 40deg
        \node[draw,thick,fill=gray,trapezium,shape border rotate=-40,shape border uses incircle] at ($(ah)+(50:1.5cm)$) (ls2) {};
        \node[scale=0.75,draw,thick,fill=gray,minimum width=14pt,rotate=-40] at ($(ls2.north)+(5pt,-0.75pt)$)  (ls22) {};
        %*/
    \end{tikzpicture}%
    %    

Best Answer

I'd use pics for the speaker and the human head:

enter image description here

The code:

\documentclass[border=5pt]{standalone}
\usepackage{tikz}

\definecolor{skin}{RGB}{248,198,135}
\definecolor{mygreen}{RGB}{66,213,0}

\newcounter{speaker}

\tikzset{
  Speaker/.pic={
    \filldraw[fill=gray!40,pic actions] 
    (-15pt,0) -- 
      coordinate[midway] (-front) 
    (15pt,0) -- 
    ++([shift={(-6pt,8pt)}]0pt,0pt) coordinate (aux1) -- 
    ++(-18pt,0) coordinate (aux2) 
    -- cycle 
    (aux1) -- ++(0,6pt) -- coordinate[midway] (-back) ++(-18pt,0) -- (aux2);
  },
  Human/.pic={
    \filldraw[fill=mygreen] 
      (0,0.7cm) ellipse [x radius=10pt,y radius=5pt]
      (0,-0.7cm) ellipse [x radius=10pt,y radius=5pt];    
    \filldraw[fill=skin] 
      (0.7,4pt) -- (0.7,-4pt) -- (0.95,0pt) -- cycle;    
    \filldraw[fill=skin] 
      (0,0) ellipse [x radius=0.8cm, y radius=0.7cm];
    \filldraw[fill=brown!85!black] 
      (0.5,0.55) arc[start angle=50,end angle=310,x radius=0.8cm, y radius=0.7cm]
      to[out=60,in=230] cycle;
    \filldraw[fill=mygreen,rounded corners]
      (-0.2,0.75) -- (0.2,0.75) -- (0.2,-0.75) -- (-0.2,-0.75) -- cycle;  
  }
}

\begin{document}

\begin{tikzpicture}
\foreach \Radius/\Shade in {4.2/10,4.1/20,4/40,3.9/60,3.8/80}
\fill[mygreen!\Shade]
  (0,0) circle [radius=\Radius];
\fill[white]
  (0,0) circle (3cm);
\foreach \Angle [count=\xi] in {0,30,60,140,280}
  \pic[rotate=\Angle-90] (sp\xi) at (\Angle:3cm) {Speaker};
\draw[dashed]
  (210:4.2cm) -- (30:4.2cm)
  (120:4.2cm) -- (300:4.2cm);
\pic[rotate=30] {Human};
% draw some arrows from and to the speakers
\draw[-latex] (sp1-front) -- ++(-10pt,0pt);
\draw[-latex] (sp1-back) -- ++(10pt,0pt);
\draw[latex-] (sp3-front) -- ++(240:10pt);
\draw[latex-] (sp3-back) -- ++(60:10pt);
\end{tikzpicture}

\end{document}
Related Question