[Tex/LaTex] Densest sphere packing

3dtikz-pgf

I would like to represent the densest sphere packing in dimension 3
as the following picture, for a beamer presentation.

Sphere packing

Is Tikz the way to go for it? It is not a real 3D drawing since I only want a fixed representation of the picture, right?

Thank you for your help.

Best Answer

By nesting 2 for-loops one could do something like this:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\foreach \x in {4,...,0}{
    \foreach \y in {\x,...,4}{    
        \draw[fill=white] (0.6*\x,-\y+0.3*\x) circle (0.55) (-0.6*\x,-\y+0.3*\x) circle (0.55);
    }
}
\end{tikzpicture}
\end{document}

enter image description here

Related Question