Files
doc_phd_thesis/022_ErrorResilience/Figures/IntraRefresh.tikz
T
2018-09-06 14:56:36 +01:00

178 lines
6.3 KiB
Plaintext

\newcommand{\DrawFrame}
{
\draw[fill=TikZColorFill,fill opacity=1, thick] (0,0) rectangle (10,8); % Opacity
}
\newcommand{\DrawFrameBorder}
{
\draw[thick] (0,0) rectangle ++(10,8);
}
\newcommand{\DrawRandomBlocks}
{
\foreach \x in {1,2,...,14}
\pgfmathparse{round((rand+1)/2*9) }
\let\roundX\pgfmathresult
\pgfmathparse{round((rand+1)/2*7) }
\let\roundY\pgfmathresult
\draw[refreshBlock] (\roundX,\roundY) rectangle ++(1cm,1cm);
}
\begin{tikzpicture}[use Hobby shortcut,closed=true]
\def\TikzFrameScale{.3}
\tikzstyle{FrameLabels} =[text centered, anchor=center]
\tikzstyle{labels} =[text centered, font=\footnotesize]
\tikzstyle{arrow} =[draw,-latex, thick]
\tikzstyle{refreshBlock} =[draw, fill=TikZColorBlock1]
\tikzstyle{refreshBlock} =[fill=TikZColorFillDark,draw=TikZColorFillDark]
\def\xfshift{8cm}
\def\yfshift{.2cm}
\def\errorPosX{3}
\def\errorPosY{5}
\begin{scope}
\begin{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=3*\yfshift, xshift=3*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\node[FrameLabels] (FrameLabel) at (12cm/2,-1.8cm) { $f_{t+3}$ };
\DrawRandomBlocks
\coordinate (endPoint) at (9,0);
\DrawFrameBorder
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=2*\yfshift, xshift=2*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\DrawRandomBlocks
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t+2}$ };
\begin{scope}[scale=\TikzFrameScale, yshift=1*\yfshift, xshift=1*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\DrawRandomBlocks
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t+1}$ };
\begin{scope}[scale=\TikzFrameScale, yshift=0*\yfshift, xshift=0*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\DrawRandomBlocks
\coordinate (startPoint) at (0,0);
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t}$ };
\path[draw, -latex] ($(FrameLabel)+(-8.8,-.4)$) -- ($(FrameLabel)+(1.2,-.4)$) node[below] {t} node[below, midway, yshift=-4] {(a) Random intra-refresh};
\end{scope}
\begin{scope}[yshift=-5cm]
\begin{scope}[scale=\TikzFrameScale, yshift=3*\yfshift, xshift=3*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\node[FrameLabels] (FrameLabel) at (12cm/2,-1.8cm) { $f_{t+3}$ };
\foreach \x in {2,...,8}
\foreach \y in {4,...,6}
\draw[refreshBlock] (\x,\y) rectangle ++(1cm,1cm);
\draw[refreshBlock] (2,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (3,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (6,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (7,3) rectangle ++(1cm,1cm);
\begin{scope}[scale=.8, yshift=5.3cm, xshift=5.8cm]
\draw[thick] (-3.5,0.5) .. (-3,2.5) .. (-1,3.5).. (1.5,3).. (4,3.5).. (5,2.5).. (5,0.5) ..(2.5,-2).. (0,-0.5).. (-3,-2).. (-3.5,0.5);
\end{scope}
\coordinate (endPoint) at (9,0);
\DrawFrameBorder
\end{scope}
\begin{scope}[scale=\TikzFrameScale, yshift=2*\yfshift, xshift=2*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\foreach \x in {2,...,6}
\foreach \y in {4,...,6}
\draw[refreshBlock] (\x,\y) rectangle ++(1cm,1cm);
\draw[refreshBlock] (5,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (6,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (7,4) rectangle ++(1cm,1cm);
\draw[refreshBlock] (7,5) rectangle ++(1cm,1cm);
\begin{scope}[scale=.8, yshift=5.3cm, xshift=4.8cm]
\draw[thick] (-3,0.5) .. (-2.5,2.5) .. (-.8,3.5).. (1.5,3).. (4.2,2.8).. (5,2.5).. (5,0.5) ..(2.5,-2).. (0,-0.5).. (-1,-.5).. (-3,0.5);
\end{scope}
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t+2}$ };
\begin{scope}[scale=\TikzFrameScale, yshift=1*\yfshift, xshift=1*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\foreach \x in {2,...,6}
\foreach \y in {3,...,5}
\draw[refreshBlock] (\x,\y) rectangle ++(1cm,1cm);
\draw[refreshBlock] (5,2) rectangle ++(1cm,1cm);
\draw[refreshBlock] (6,2) rectangle ++(1cm,1cm);
\draw[refreshBlock] (7,3) rectangle ++(1cm,1cm);
\draw[refreshBlock] (7,4) rectangle ++(1cm,1cm);
\begin{scope}[scale=.8, yshift=4.3cm, xshift=4.8cm]
\draw[thick] (-3,0.5) .. (-2.5,2.5) .. (-.8,3.5).. (1.5,3).. (4.2,2.8).. (5,2.5).. (5,0.5) ..(2.5,-2).. (0,-0.5).. (-1,-.5).. (-3,0.5);
\end{scope}
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t+1}$ };
\node[labels, anchor=center] at (-.8, 2.5) (RoiLabel) {\small ROI};
\begin{scope}[scale=\TikzFrameScale, yshift=0*\yfshift, xshift=0*\xfshift, yslant=\TikZyslant,xscale=\TikZxscale]
\DrawFrame
\coordinate (Center) at (5,3.5);
\foreach \x in {1,...,7}
\foreach \y in {2,...,4}
\draw[refreshBlock] (\x,\y) rectangle ++(1cm,1cm);
\draw[refreshBlock] (1,1) rectangle ++(1cm,1cm);
\draw[refreshBlock] (2,1) rectangle ++(1cm,1cm);
\draw[refreshBlock] (5,1) rectangle ++(1cm,1cm);
\draw[refreshBlock] (6,1) rectangle ++(1cm,1cm);
\begin{scope}[scale=.8, yshift=3.3cm, xshift=4.8cm]
\draw[thick] (-3.5,0.5) .. (-3,2.5) .. (-1,3.5).. (1.5,3).. (4,3.5).. (5,2.5).. (5,0.5) ..(2.5,-2).. (0,-0.5).. (-3,-2).. (-3.5,0.5);
\end{scope}
\path[draw,-latex] (RoiLabel) -- (2.1,5.3);
\coordinate (startPoint) at (0,0);
\DrawFrameBorder
\end{scope}
\node[FrameLabels] at (Center |- FrameLabel) { $f_{t}$ };
\path[draw, -latex] ($(FrameLabel)+(-8.8,-.4)$) -- ($(FrameLabel)+(1.2,-.4)$) node[below] {t} node[below, midway, yshift=-4] {(b) ROI based intra-refresh};
\end{scope}
\node[refreshBlock, anchor=center, minimum size=.5cm] (RefreshExample) at (0, -7.5) {};
\node[labels, anchor=center, right=.1 of RefreshExample] {\small Intra-coded blocks};
\path (-1.4,-3) rectangle ++(12.3,2);
\end{scope}
\end{tikzpicture}