I have a graph that consists of x and y from Z/11. Is it possible to programmatically draw the lines that have a slope of 2?
Like from (0,0) to (5,10) and (6,12) would become (6,1) because of modulo 11. Just like the graph below.

For that graph I use the following code. But I have to manually calculate the start and end points.
\begin{tikzpicture}
\coordinate (Origin) at (0,0);
\coordinate (XAxisMin) at (0,0);
\coordinate (XAxisMax) at (11,0);
\coordinate (YAxisMin) at (0,0);
\coordinate (YAxisMax) at (0,11);
\draw [thick, gray,-latex] (XAxisMin) -- (XAxisMax);% Draw x axis
\draw [thick, gray,-latex] (YAxisMin) -- (YAxisMax);% Draw y axis
\foreach \x in {0,1,...,10}{% Two indices running over each
\foreach \y in {0,1,...,10}{% node on the grid we have drawn
\node[draw,circle,inner sep=1pt,fill] at (\x,\y) {};
% Places a dot at those points
}
}
\draw [thin, blue,-latex] (Origin) -- (5,10);
\draw [thin, blue,-latex] (6,1) -- (10,9);
\end{tikzpicture}

