% This picture represents a complex lattice with two linearly independent
% periods
% (C) Thiago Brevidelli
\begin{tikzpicture}[>=triangle 45, scale=0.7]
  % The axis
  \draw[line width=0.6pt] (0, -1) -- (0, 4);
  \draw[line width=0.6pt] (-1, 0) -- (6, 0);

  % The background grid
  \foreach \x in {-1,,1,2,3,4,5,6}
  \draw[dotted, line width=0.6pt] (\x, -1) -- (\x, 4);
  \foreach \y in {-1,,1,2,3,4}
  \draw[dotted, line width=0.6pt] (-1, \y) -- (6, \y);

  % The lattice
  \begin{scope}
    \clip(-1, -1) rectangle (6, 4);

    \foreach \i in {-1,0,1,2}
    {
      \begin{scope}[shift={({\i * (3 - 1/2)}, 0)}]
        \draw[line width=0.6pt, color=cyan] (-.5, -1) -- (2, 4);
      \end{scope}

      \begin{scope}[shift={(0, {\i * (2 - 1/3)})}]
        \draw[line width=0.6pt, color=cyan] (-1, {-1/3}) -- (6, 2);
      \end{scope}
    }
  \end{scope}

  % The generators of the lattice
  \draw[->, >=stealth, line width=0.8pt, color=blue] (0, 0) -- (1, 2);
  \draw[->, >=stealth, line width=0.8pt, color=blue] (0, 0) -- (3, 1);
  \draw[line width=0.8pt, color=blue] (4, 3)-- (3, 1);
  \draw[line width=0.8pt, color=blue] (4, 3)-- (1, 2);
\end{tikzpicture}
