5

Is there any tikz library with built in shapes like antennas (simple Y shaped), wireless channel (a cloud essentially), filters etc? In particular I'm looking to draw similar diagrams to: http://en.m.wikipedia.org/wiki/Mimo (the first figure). I guess most of the blocks can be rendered using rectangles but would be nice to have some built in shapes as well.

4

1 Answer 1

7

You could just annotate a rectangle node with extra code. Here I've used "pics" which require pgf 3.0.0. The naming/parameterization could undoubtedly be improved.

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}
\begin{document}

\tikzset{%
  wireless/.pic={
      \draw [->] (0,0) -| (.5,#1);
    \foreach \r in {.1,.2,.3}
      \draw (.6,#1) ++ (60:\r) arc (60:-60:\r);
  },
  vdots/.pic={
    \foreach \i in {-.1,0,.1}
      \fill (.25,\i) circle [radius=.75pt]; 
  },
  block/.style={
    shape=rectangle,
    minimum width=2cm,
    minimum height=1cm,
    draw
  },
  Tx/.style 2 args={
    block,
    node contents=Tx,
    append after command={
      \pgfextra{\pgfnodealias{@}{\tikzlastnode}}
      (@.north #1) [yshift=-.125cm] pic [#2] {wireless=.5}
      (@.#1)                        pic [#2] {vdots}
      (@.south #1) [yshift= .125cm] pic [#2] {wireless=.5}
    }
  },
  MIMO Tx east/.style={Tx={east}{xscale=1}},
  MIMO Tx west/.style={Tx={west}{xscale=-1}},
}
\begin{tikzpicture}

\node at (0,0) [MIMO Tx west];
\node at (0,2) [MIMO Tx east];

\end{tikzpicture}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .