# Drawing topology of network with Tikz

I want to draw with Tikz a topology as illustrated below

The shape of node preferred is ball, can you help me ?

• @cfr, can you help me? – MEDIOUNI Jun 26 '16 at 0:09
• As this is your 4th question with an answer which seems to solve your problem, you should consider accepting them (by clicking on the checkmark ✓). Furthermore you can thank the people by upvoting the answers (with the upward pointing arrow to the left of it). – samcarter_is_at_topanswers.xyz Jun 26 '16 at 10:49

This isn't hugely difficult, and the pictures use nothing that isn't obviously in the manual:

\documentclass[varwidth,border=5]{standalone}
\usepackage{tikz}
minimum size=0.375cm}}
\begin{document}
\centering
\begin{tikzpicture}
\foreach \i in {0,...,7}
\node [ball] (n-\i) at (\i*45:1) {};
\foreach \i [evaluate={\j=int(\i+4);}] in {0,...,3}
\draw (n-\i) -- (n-\j);
\end{tikzpicture}
\\[1em]
\begin{tikzpicture}
\draw grid (2, 2);
\foreach \i in {0,...,2}\foreach \j in {0,...,2}
\node [ball] (n-\i-\j) at (\j, \i) {};
\end{tikzpicture}
\\[1em]
\begin{tikzpicture}
\draw grid (2, 2);
\draw [shift={(0, 0, 1)}] grid (2, 2);
\foreach \i in {0,...,2}\foreach \j in {0,...,2}\foreach \k in {0,1}
\node [ball] (n-\i-\j-\k) at (\j, \i, \k) {};
\foreach \i in {0,...,2}\foreach \j in {0,...,2}
\draw (n-\i-\j-0) -- (n-\i-\j-1);
\end{tikzpicture}
\end{document}