Dense packing is a term given when arranging spheres to be as close to each other as possible so that they take up the least amount of space.
Layered Dense Packing
That mountain of stacked oranges at the grocery store is a good example of what people think of when they talk about dense packing. How do you stack a display of oranges so they take the least amount of space and they don't roll all over the floor. If you look closely you'll see the oranges are layered. This is because they are on a flat surface and gravity is pulling them downward towards the table. Even though it's a 3D stack of oranges it's shape is dictated by the 2D table underneath it. When you do a web search for "Dense Packing" you will find many articles discussing this type of layered packing.
Looking at the sides of the pyramid of oranges you will see they make triangles. However the bottom of the pyramid makes a square. Therefore in the purest sense it is not completely densely packed. The sides are densely packed but the bottom is not. When in the shape of a triangle the spheres are nestled together tightly. When in the shape of a square the spheres are adjoining but not tightly packed. Is it possible to create complex shapes with spheres where all the faces are triangular in shape?
Edo tried a lot of different shapes and structures while playing with marbles and magnets. He stacked them, made cylinders, spheres, cubes, etc. He realized dense packing made a structure stable and stopped all motion. He figured stable elements must have structures that do not move, that's what makes them stable.
In researching dense packing on the web he realized they didn't have the answer. Instead of gravity pulling objects in one direction onto a flat surface, Edo envisioned a central pulling force bringing the marbles together. He investigated the structures made in that situation and looked at their properties. That's when he formulated the idea of spherical dense packing....
Spherical Dense Packing
From left to right - Tetrahedron (4 magnets), Octahedron (6), Cube or Hexahedron (8), Icosahedron (12). The fifth platonic solid, the dodecahedron (20) cannot be made using magnets. It is hollow and highly unstable.
Little can be found about how spheres come together when the attracting force is to an imaginary center. If you also require that the faces between the spheres always be a triangle then the possibilities are even more limited.
There are three shapes that fit this requirement and they are 3 of the 5 platonic solids - the tetrahedron, octahedron and icosahedron. These three platonic solids all have faces that make a triangle.
The cube has faces that are squares. This makes it so the magnets are stacked on top of each other, they aren't nestled together tightly. The cube is relatively unstable and can be easily broken.
The dodecahedron has faces that are pentagons. This shape is so unstable it cannot be built using magnets and so it isn't pictured here.