[Tex/LaTex] Tikz: How to create and reuse a picture

tikz-pgf

I am a beginner in Tikz and I have two questions:

  1. I'm trying to draw the picture below but have been unsuccessful (I drew the right part though but couldn't draw the left one)
  2. How can I reuse these two shapes in other pictures if I use them a lot?

This is what I used to draw the right part:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}
    \draw[semithick] (0,0) -- (1,4);% left line
    \draw[semithick] (3,0) -- (2,4);% right line
    \draw[semithick] (0,0) arc (180:0:1.5 and -0.5);
    \draw[semithick] (1.5,4) ellipse (0.5 and 0.166);
\end{tikzpicture}
\end{document}

enter image description here

I appreciate your help and thank you in advance.

Best Answer

For re-using, you can use pic:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,}
\tikzset{radiation/.style={{decorate,decoration={expanding waves,angle=90,segment length=4pt}}},
         antenna/.pic={
        code={\tikzset{scale=5/10}
            \draw[semithick] (0,0) -- (1,4);% left line
            \draw[semithick] (3,0) -- (2,4);% right line
            \draw[semithick] (0,0) arc (180:0:1.5 and -0.5);
            \node[inner sep=4pt] (circ) at (1.5,5.5) {};
            \draw[semithick] (1.5,5.5) circle(8pt);
            \draw[semithick] (1.5,5.5cm-8pt) -- (1.5,4);
            \draw[semithick] (1.5,4) ellipse (0.5 and 0.166);
            \draw[semithick,radiation,decoration={angle=45}] (1.5cm+8pt,5.5) -- +(0:2);
            \draw[semithick,radiation,decoration={angle=45}] (1.5cm-8pt,5.5) -- +(180:2);
  }}
}

\begin{document}
\begin{tikzpicture}
    \path (0,0) pic {antenna};
    \path (4,0) pic[scale=0.75,color=red] {antenna};
    \path (0,-4) pic[scale=0.5,rotate=45] {antenna};
\end{tikzpicture}

\end{document}

enter image description here

I have also defined a new radiation style using exapnding waves decoration.