答案1
这并不是太难,并且图片没有使用手册中没有明显说明的内容:
\documentclass[varwidth,border=5]{standalone}
\usepackage{tikz}
\tikzset{ball/.style={shape=circle, shading=ball, ball color=blue!50!cyan!50,
minimum size=0.375cm}}
\begin{document}
\centering
\begin{tikzpicture}
\draw circle [radius=1];
\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}