I'm drawing nodes on a circle and switched from drawing lines based on coordinates to drawing them based on named nodes.
The problem now is, that with the following code the lines stop at the edges of the nodes, but don't point at the center.
How do I fix this?
\begin{tikzpicture}
\xdef\nodes{16}
\pgfmathsetmacro{\nodesminusone}{\nodes-1}
\pgfmathsetmacro{\N}{log2(\nodes)}
\xdef\deltadegree{360/\nodes}
\draw (0,0) circle (6);
\foreach \i in {0,...,\nodesminusone}
\node[circle,fill=white,draw=black,thick] (node\i) at (-\i*\deltadegree+90:6) {\i};
\foreach \i in {0,...,\nodesminusone}{
\foreach \j in {0,...,\N}{
\pgfmathsetmacro{\result}{mod(\i+2^\j,\nodes)}
\draw[->,thick,color=black!10] (node\i) -- (node\result);
}
}
\foreach \i in {2} {
% predecessor
\pgfmathsetmacro{\result}{mod(\i-1,\nodes)}
\draw (node\i) -- (node\result);
% successor
\pgfmathsetmacro{\result}{mod(\i+1,\nodes)}
\draw (node\i) -- (node\result);
% fingers
\foreach \j in {0,...,\N}{
\pgfmathsetmacro{\result}{mod(\i+2^\j,\nodes)}
\draw[->,color=blue,thick] (node\i) -- (node\result);
}
}
\end{tikzpicture}