[Tex/LaTex] Draw a circular node with a sine cirve in it to resemble the symbol a short sine wave

nodestikz-pgf

How can I do this in TikZ:
I want to draw a circular node with a sine curve in it to resemble the symbol of a short sine wave like in the diagram shown in the link below. I can draw a circle but I don't know how to put the sine curve inside.
the diagram

Best Answer

A simple way of doing this is with a path picture. Using some extra magic, the path picture can be set up so (-1,-1) is the lower left corner and (1,1) is the upper right corner of the picture. This makes it quite straightforward to specify path picture elements.

\documentclass[tikz,border=5]{standalone}
\tikzset{%
  do path picture/.style={%
    path picture={%
      \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
        {\pgfpointanchor{path picture bounding box}{north east}}%
      \pgfgetlastxy\x\y%
      \tikzset{x=\x/2,y=\y/2}%
      #1
    }
  },
  sin wave/.style={do path picture={    
    \draw [line cap=round] (-3/4,0)
      sin (-3/8,1/2) cos (0,0) sin (3/8,-1/2) cos (3/4,0);
  }},
  cross/.style={do path picture={    
    \draw [line cap=round] (-1,-1) -- (1,1) (-1,1) -- (1,-1);
  }},
  plus/.style={do path picture={    
    \draw [line cap=round] (-3/4,0) -- (3/4,0) (0,-3/4) -- (0,3/4);
  }}
}
\begin{document}
\begin{tikzpicture}[minimum size=0.75cm]
\node [circle, draw, sin wave] at (-1, 0) {};
\node [circle, draw, plus]     at ( 0, 0) {};
\node [circle, draw, cross]    at ( 1, 0) {};
\end{tikzpicture}
\end{document}

enter image description here