[Tex/LaTex] Drawing system architecture in Tikz

tikz-pgf

I'm pretty new to Tikz. How can I draw the below graph in Tikz?system

I will break up my questions into small pieces.

  1. How can I group a bunch of objects and form a big one?
  2. How can I zoom an object and place detailed objects into the zoomed container?
  3. How to draw a human figure?
  4. How to scatter objects inside a container without predefined placement info?

Any help is much appreciated!

Best Answer

This is too complicated for a comment. It is based on Gregor Perčič's solution.

First, you can simplify drawing rectangles. Second, using a scope you can move a group of objects around using the shift key, and create a node (more or less) using the local bounding box key.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{fit,positioning}

\begin{document}
\begin{tikzpicture}

\begin{scope}[shift={(1,1)},local bounding box=A]
\draw (0,0) rectangle (11.3,1.5);
\draw (0.2,0.2) rectangle (3.2,1);
\draw (3.7,0.2) rectangle (6.7,1);
\draw (7.2,0.2) rectangle (10.2,1);
\node[scale=0.8] at (1.65,0.5) {$S_{x_{1}}$};
\node[scale=0.8] at (5.5,0.5) {$S_{x_{2}}$};
\node[scale=0.8] at (8.5,0.5) {$S_{x_{3}}$};
\node[scale=0.8] at (10.65,0.5) {$S_{x}$};
\end{scope}

\draw[->] (0,0) -- (A.west);
\end{tikzpicture}
\end{document}