phd-thesis-en/figures/ca-glider.tikz
2017-07-08 17:42:46 +02:00

75 lines
2 KiB
Text

\documentclass[crop,tikz]{standalone}
\input{common-headers}
\begin{document}
\newcommand{\common}{%
\coordinate (ll) at (-0.5cm,-0.5cm);
\coordinate (ur) at ( 3.5cm, 3.5cm);
\draw[thick] (ll) rectangle (ur);
\clip (ll)+(-0.1cm,-0.1cm) rectangle ([shift={(0.1cm,0.1cm)}]ur);
}
\begin{tikzpicture}[
cell/.style={fill=black!60, inner sep=0cm,
minimum width=1cm, minimum height=1cm}]
\common
\node[cell] at (0cm,1cm) {};
\node[cell] at (1cm,1cm) {};
\node[cell] at (1cm,3cm) {};
\node[cell] at (2cm,1cm) {};
\node[cell] at (2cm,2cm) {};
\draw[xshift=0.5cm,yshift=0.5cm] (ll) grid (ur);
\end{tikzpicture}
\begin{tikzpicture}[
cell/.style={fill=black!60, inner sep=0cm,
minimum width=1cm, minimum height=1cm}]
\common
\node[cell] at (0cm,2cm) {};
\node[cell] at (1cm,0cm) {};
\node[cell] at (1cm,1cm) {};
\node[cell] at (2cm,1cm) {};
\node[cell] at (2cm,2cm) {};
\draw[xshift=0.5cm,yshift=0.5cm] (ll) grid (ur);
\end{tikzpicture}
\begin{tikzpicture}[
cell/.style={fill=black!60, inner sep=0cm,
minimum width=1cm, minimum height=1cm}]
\common
\node[cell] at (0cm,1cm) {};
\node[cell] at (1cm,0cm) {};
\node[cell] at (2cm,0cm) {};
\node[cell] at (2cm,1cm) {};
\node[cell] at (2cm,2cm) {};
\draw[xshift=0.5cm,yshift=0.5cm] (ll) grid (ur);
\end{tikzpicture}
\begin{tikzpicture}[
cell/.style={fill=black!60, inner sep=0cm,
minimum width=1cm, minimum height=1cm}]
\common
\node[cell] at (1cm,0cm) {};
\node[cell] at (1cm,2cm) {};
\node[cell] at (2cm,0cm) {};
\node[cell] at (2cm,1cm) {};
\node[cell] at (3cm,1cm) {};
\draw[xshift=0.5cm,yshift=0.5cm] (ll) grid (ur);
\end{tikzpicture}
\begin{tikzpicture}[
cell/.style={fill=black!60, inner sep=0cm,
minimum width=1cm, minimum height=1cm}]
\common
\node[cell] at (1cm,0cm) {};
\node[cell] at (2cm,0cm) {};
\node[cell] at (2cm,2cm) {};
\node[cell] at (3cm,0cm) {};
\node[cell] at (3cm,1cm) {};
\draw[xshift=0.5cm,yshift=0.5cm] (ll) grid (ur);
\end{tikzpicture}
\end{document}