Files
doc_phd_thesis/022_ErrorResilience/Figures/LocalizationTechniques.tikz
T
2018-08-01 16:26:10 +01:00

210 lines
9.1 KiB
Plaintext

\newcommand{\DrawFrame}[1]
{
\draw[fill=#1,fill opacity=1, thick] (0,0) rectangle (9+1,8); % Opacity
% \draw[thick] (0,0) rectangle (#2+1,#2+1);
% \foreach \x in {1,...,#2}
% \draw (\x,0) -- ++(0,#2+1);
% \foreach \y in {1,...,#2}
% \draw (0,\y) -- ++(#2+1,0);
}
\begin{tikzpicture}[use Hobby shortcut,closed=true]
\def\TikzFrameScale{.35}
\tikzstyle{labels} =[text centered, font=\footnotesize]
\tikzstyle{arrow} =[draw,-latex, thick]
\tikzstyle{errorBlock}=[draw=colorErrors, fill=colorErrors]
\tikzstyle{errorPropagation}=[draw=colorErrorProp, fill=colorErrorProp]
\tikzstyle{refresh}=[fill=colorBackgroundSecondary,draw=colorBackgroundSecondary]
\def\xfshift{5.5cm}
\def\yfshift{.2cm}
\def\errorPosX{3}
\def\errorPosY{5}
\begin{scope}
\node[labels, text width=2.1cm] (ErrorPropLabel) at (5,11*\TikzFrameScale) {Error \\ propagation};
\node[labels, text width=2.1cm] (Error) at (4.3,2*\TikzFrameScale) {Lost data};
\begin{scope}[scale=\TikzFrameScale,xshift=-1cm]
\draw[fill=colorBackground,fill opacity=1] (0,-1) rectangle ++(10,9);
\draw[errorBlock,draw] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\foreach \x in {\errorPosX,...,8}
\draw[errorPropagation] (\x+1,\errorPosY) rectangle ++(1 cm,1 cm);
\foreach \y in {-1,0,1,2,3,4}
\foreach \x in {0,1,2,3,4,5,6,7,8,9}
\draw[errorPropagation] (\x,\y) rectangle ++(1 cm,1 cm);
% \draw (0,\errorPosY) -- ++(\errorPosX + 1,0) -- ++(0,1) -- ++(8-\errorPosX,0);
\path[arrow] (ErrorPropLabel) edge[bend right] (8,5);
\path[arrow] (Error) -- (\errorPosX +.5, \errorPosY +.5);
\draw[thick] (0,-1) rectangle ++(10,9);
\node[labels,text width=3.5cm] at (4.5,-3) {\textbf{Error propagation \\ within a frame}};
\end{scope}
\begin{scope}[yshift=.5cm, xshift=5.5cm]
\begin{scope}[scale=\TikzFrameScale, yshift=3*\yfshift, xshift=3*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+3}$ };
\draw[errorPropagation] (\errorPosX ,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +2,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX ,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +2,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +0,\errorPosY -2) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY -2) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +0,\errorPosY -3) rectangle ++(1cm,1cm);
\coordinate (endPoint) at (9,0);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=2*\yfshift, xshift=2*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+2}$ };
\draw[errorPropagation] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +2,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX+1,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX+1,\errorPosY -2) rectangle ++(1cm,1cm);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=1*\yfshift, xshift=1*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+1}$ };
\draw[errorPropagation] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\coordinate (tempErrorPropPoint) at (\errorPosX +.5,\errorPosY +.5);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=0*\yfshift, xshift=0*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t}$ };
\draw[errorBlock] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\coordinate (startPoint) at (0,0);
\path[arrow] (Error) -- (\errorPosX +.5, \errorPosY +.5);
\end{scope}
\path[arrow] (ErrorPropLabel) edge[bend left] (tempErrorPropPoint);
\path (startPoint) -- (endPoint) node[labels, pos=.5, yshift=-1.5cm] {\textbf{Error propagation over time}};
\end{scope}
\end{scope}
\begin{scope}[yshift=-5cm]
\node[labels, text width=1.2cm] (Refresh) at (4.3,2*\TikzFrameScale) {Refresh blocks};
\begin{scope}[scale=\TikzFrameScale,xshift=-1cm]
\draw[fill=colorBackground,fill opacity=1] (0,-1) rectangle ++(10,9);
\foreach \y in {0,2,...,6}
\foreach \x in {0,1,2,3,4,5,6,7,8,9}
\draw[refresh] (\x,\y) rectangle ++(1 cm,1 cm);
\draw[errorBlock,draw] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\foreach \x in {\errorPosX,...,8}
\draw[errorPropagation] (\x+1,\errorPosY) rectangle ++(1 cm,1 cm);
\draw[thick] (0,-1) rectangle ++(10,9);
% \path[arrow] (ErrorPropLabel.0) -- (7,5.5);
% \path[arrow] (Error) -- (\errorPosX +.5, \errorPosY +.5);
\node[scale=.6] at (0.8, 0.5) {G1};
\node[scale=.6] at (0.8, -0.5) {G2};
\node[labels,text width=3.5cm] at (4.5,-3) {\textbf{Spatial localisation \\ example}};
\end{scope}
\begin{scope}[xshift=5.5cm]
\begin{scope}[scale=\TikzFrameScale, yshift=3*\yfshift, xshift=3*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+3}$ };
\draw[errorPropagation] (\errorPosX ,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +2,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX ,\errorPosY -1) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX +1,\errorPosY -1) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX +2,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +0,\errorPosY -2) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX +1,\errorPosY -2) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX +0,\errorPosY -3) rectangle ++(1cm,1cm);
\draw[refresh] (8,4) rectangle ++(1cm,1cm);
\draw[refresh] (4,4) rectangle ++(1cm,1cm);
\draw[refresh] (7,6) rectangle ++(1cm,1cm);
\draw[refresh] (7,1) rectangle ++(1cm,1cm);
\draw[refresh] (3,3) rectangle ++(1cm,1cm);
\coordinate (endPoint) at (9,0);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=2*\yfshift, xshift=2*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+2}$ };
\draw[errorPropagation] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +2,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX,\errorPosY -1) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX+1,\errorPosY -1) rectangle ++(1cm,1cm);
% \draw[errorPropagation] (\errorPosX+1,\errorPosY -2) rectangle ++(1cm,1cm);
\draw[refresh] (8,4) rectangle ++(1cm,1cm);
\draw[refresh] (4,4) rectangle ++(1cm,1cm);
\draw[refresh] (7,6) rectangle ++(1cm,1cm);
\draw[refresh] (7,1) rectangle ++(1cm,1cm);
\draw[refresh] (3,2) rectangle ++(1cm,1cm);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=1*\yfshift, xshift=1*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t+1}$ };
\draw[errorPropagation] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX,\errorPosY -1) rectangle ++(1cm,1cm);
\draw[errorPropagation] (\errorPosX +1,\errorPosY) rectangle ++(1cm,1cm);
\draw[refresh] (1,2) rectangle ++(1cm,1cm);
\draw[refresh] (2,4) rectangle ++(1cm,1cm);
\draw[refresh] (5,3) rectangle ++(1cm,1cm);
\draw[refresh] (7,6) rectangle ++(1cm,1cm);
\draw[refresh] (7,1) rectangle ++(1cm,1cm);
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=0*\yfshift, xshift=0*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame{colorBackground}
\node at (12cm/2,-1.5cm) { $f_{t}$ };
\draw[errorBlock] (\errorPosX,\errorPosY) rectangle ++(1cm,1cm);
\coordinate (startPoint) at (0,0);
\draw[refresh] (1,2) rectangle ++(1cm,1cm);
\draw[refresh] (2,4) rectangle ++(1cm,1cm);
\draw[refresh] (5,3) rectangle ++(1cm,1cm);
\draw[refresh] (7,6) rectangle ++(1cm,1cm);
\draw[refresh] (7,1) rectangle ++(1cm,1cm);
\path[arrow] (Refresh) -- (2.5,4.5);
\end{scope}
\path (startPoint) -- (endPoint) node[labels, pos=.5, yshift=-1.5cm] {\textbf{Temporal localisation example}};
\end{scope}
\end{scope}
\end{tikzpicture}