phd-defence-fr/vector/simpleexample-propagation.tikz
2017-07-06 15:51:31 +02:00

54 lines
2 KiB
Text

\begin{tikzpicture}[
cell/.style={node distance=0.15cm,minimum size=0.6cm},
0cell/.style={circle,inner sep=0,minimum size=4pt,fill=black,draw=white,thick}]
\begin{pgfscope}
\clip ( 0.7, 0.7) rectangle
(-0.7,-0.7);
\node[cell,fill,forest] (centre) {};
\node[cell,fill,gray!60] (cg) [left =of centre] {};
\node[cell,fill,fire] (cd) [right=of centre] {};
\node[cell,fill,gray!60] (hc) [above=of centre] {};
\node[cell,fill,gray!60] (hg) [above=of cg] {};
\node[cell,fill,gray!60] (hd) [above=of cd] {};
\node[cell,fill,gray!60] (bc) [below=of centre] {};
\node[cell,fill,gray!60] (bg) [below=of cg] {};
\node[cell,fill,gray!60] (bd) [below=of cd] {};
\draw[step=0.75cm,xshift=0.375cm,yshift=0.375cm,thick]
(bg.south west) grid (hd.north east);
\node[0cell] at (barycentric cs:centre=1,hg=1) {};
\node[0cell] at (barycentric cs:centre=1,hd=1) {};
\node[0cell] at (barycentric cs:centre=1,bg=1) {};
\node[0cell] at (barycentric cs:centre=1,bd=1) {};
\end{pgfscope}
\node (milieu) at (1,0) {$\Rightarrow$};
\node (legende) at (1,-1) {propagation};
\begin{pgfscope}
\begin{scope}[xshift=2cm]
\clip ( 0.7, 0.7) rectangle
(-0.7,-0.7);
\node[cell,fill,fire] (centre) {};
\node[cell,fill,white ] (cg) [left =of centre] {};
\node[cell,fill,white ] (cd) [right=of centre] {};
\node[cell,fill,white ] (hc) [above=of centre] {};
\node[cell,fill,white ] (hg) [above=of cg] {};
\node[cell,fill,white ] (hd) [above=of cd] {};
\node[cell,fill,white ] (bc) [below=of centre] {};
\node[cell,fill,white ] (bg) [below=of cg] {};
\node[cell,fill,white ] (bd) [below=of cd] {};
\draw[step=0.75cm,xshift=0.375cm,yshift=0.375cm,thick]
(bg.south west) grid (hd.north east);
\node[0cell] at (barycentric cs:centre=1,hg=1) {};
\node[0cell] at (barycentric cs:centre=1,hd=1) {};
\node[0cell] at (barycentric cs:centre=1,bg=1) {};
\node[0cell] at (barycentric cs:centre=1,bd=1) {};
\end{scope}
\end{pgfscope}
\end{tikzpicture}