There are several ways of locating congruent disjoint balls in 3D so as to include many balls in some large volume (perhaps even to maximize the number). (A ball is the interior of a sphere.) Some of these ways are equivalent and some are different. We explore some of these here. We assume all balls have the same radius.

Starting with Square Arrangements

First an easy non dense packing. Suppose we have ball centers at <i, j, k> for arbitrary integral values of i, j and k. They touch if r = 1/2. A unit cell has volume 1 and holds just one ball. The density is thus 4/3 π r3 = π/6 = 0.524. Note that each ball touches 6 others.

Suppose that we start with a 2D square array of balls in a plane: <i, j, 0>. We can pile another array closer to the first if we offset the new array thus: <i+1/2, j+1/2, z>. If we set z = 1/√2 then the distance between neighboring centers in the original plane is the same as between interplanar neighbors. r = 1/2 and the cell is [0,1] × [0,1] × [0,√2] whose volume is √2. The cell holds two balls. The density is (π/3)/√2 = 0.740. Each ball touches 12 others.

Lets try two populations of centers, one at <i, j, k> and the other at <i+1/2, j+1/2, k+1/2>. The distance between neighboring centers is now √(3/4). There are two balls per cell; the cell size is 1 and the density is thus 0.680. Each ball touches just 8 others. This seems to be body centered.

Now we try “face centered” as follows:
four populations of centers:

The cell has volume 1 and holds 4 balls each with radius (√(1/2))/2 for a density of 0.740. Each ball touches 12 others.

Starting Hexagonally

Above are the obvious arrangements starting with perpendicular vectors between centers. What of configurations that begin with hexagonal arrangements? There are two kinds of coordinate systems, the familiar orthogonal coordinate systems that we use above, and oblique coordinates which are especially convenient here. We shall begin with oblique coordinates where one must declare the dot product of each pair of coordinate bases. If ej is the jth basis vector then gij = ei ⋅ ej which is the metric tensor for this coordinate system. The distance between points given in oblique coordinates is √(∑ij gijdxidxj).

We choose basis vectors that have dot product 1 if they are the same and 1/2 otherwise. Or:
gij =
A hexagonal array of balls in a plane is defined by <i, j, 0>. The distance between <1, 0, 0> and <0, 1, 0> is 1 and together with <0, 0, 0> an equilateral triangle is formed. The 3D array <i, j, k> locates centers of disjoint balls with radius 1/2. The volume of the cell is √(determinant of g) which is √(1/2). With one ball per cell the density is 0.740. The 12 balls touching <0, 0, 0> are centered at <±1, 0, 0>, <0, ±1, 0>, <0, 0, ±1> and the six permutations of <1, −1, 0>.

In each of the configurations so far, translation of the entire array by the vector connecting centers of two neighbors, leaves the array unchanged. Here is a packing without that property. When we placed the second layer in the preceding example we had a choice. We placed the second layer so that a ball at <0, 0, 1> in that layer touched each of <0, 0, 0>, <1, 0, 0> and <0, 1, 0> in the first layer. Alternatively we could have placed the second layer at <i+1/3, j+1/3, 1>. That choice places a ball at <1/3, 1/3, 1> which touches each of <1, 1, 0>, <1, 0, 0> and <0, 1, 0> in the first layer. The choice is fresh for each layer. Chemistry often likes to alternate choices which gives hexagonal closest packing. Regardless of these choices the density tends to .740 . As we shall see, a consistent choice is equivalent to cubic closest packing!

Density and number of balls that touch a given ball are properties of packings and do not depend on coordinates. The face centered cubic packing and hexagonal packing with uniform layering choice share these properties. Are they the same packing?

Yes, except for ball radius. In the coordinates used for face centered cubic closest packing we select the following vectors as a basis for a new coordinate system: <1/2, 1/2, 0>, <1/2, 0, 1/2>, <0, 1/2, 1/2>. Each of these vectors corresponds to a vector connecting centers of neighboring balls in the packing. The metric tensor for the coordinates system with this basis is
gij =
which is just 1/2 of the metric for the first hexagonal packing. The cubic closest packing is just a model of the hexagonal packing scaled by 1/√2.

The other packings can be discriminated either on the basis of density of number of neighbors.

See diamond’s structure for an even less dense packing.

See some sphere packing in higher dimensions.

If n+1 unit radius balls touch each other in n dimensions, then their centers determine a regular simplex whose volume is given by the Cayley-Menger determinant. This simplex, and n! others congruent to it, compose and partition a unit cell of all those points each of whose coordinates belong to [0,1]—a parallelepiped. The content of this cell is √(determinant of g).

For the array of balls with radius = 1/2 and centered on points whose oblique coordinates are all integers. The metric tensor is
gij = (δij + 1)/2 and its determinant seems to be (n+1)2−n. The density of this packing ρ = (volume of sphere)/(volume of cell)
= (πn/2(1/2)n/(n/2)!)/√((n+1)2−n) = πn/22−n/2/((n/2)!√(n+1)). Here are some <n, ρn> values
0 1.000000e+008 8.455650e-0216 2.229534e-0424 9.421750e-08
1 1.000000e+009 4.609806e-0217 9.178457e-05
2 9.068997e-0110 2.402823e-0218 3.680773e-05
3 7.404805e-0111 1.201847e-0219 1.439750e-05
4 5.517277e-0112 5.786488e-0320 5.499537e-06
5 3.798813e-0113 2.688948e-0321 2.053627e-06
6 2.441515e-0114 1.208824e-0322 7.504107e-07
7 1.476489e-0115 5.267991e-0423 2.685649e-07 (see)
What spheres touch the sphere at the origin? The 2n permutations of <1, 0, 0, ...> and <−1, 0, ...> are at distance 1. The n(n−1) permutations of <1, −1, 0, ...> are as well. For each of this latter set of lattice points: For some p and q: 0≤p<n and 0≤q<n and p≠q and dxp = 1 and dxq = −1 and for each k (dxk = 0 or k=p or k=q). Then d = √(∑ij gijdxidxj)
= √(gppdxpdxp + gpqdxpdxq + gqpdxqdxp + gqqdxqdxq)
= √(1 − ½ − ½ + 1) = 1. Summation convention is suppressed for p and q. Together we have found n(n+1) lattice points at distance 1 from the origin. The program below says that for n≤10 these are all. There are interstices that must be watched as n grows. Perhaps these will accommodate a new sphere at some point (n=24?). Perhaps some lattice point not conforming to our pattern will be at distance 1.

// Compute the distance from the origin to each
// lattice point in the (2b+1)^n box.
#include <stdio.h>
#include <math.h>
#define n 10
#define b 2
#define do(x) for(ndx[x] = -b; ndx[x]<=b; ++ndx[x])
static double g[n][n];
static double const eps = 1.e-10;
int ndx[n];
void pc(char * m){printf(m); 
    for(int j=0; j<n; ++j) printf(" %d", ndx[j]); printf("\n");}
int main(){int nc=0;
for(int j=0; j<n; ++j) for(int k=0; k<n; ++k) g[j][k] = j==k?1.:0.5;
do(0) do(1) do(2) do(3) do(4) do(5) do(6) do(7) do(8) do(9) {double d = 0;
  for(int i=0; i<n; ++i) for(int j=0; j<n; ++j) d += g[i][j]*ndx[i]*ndx[j];
  if(d < 1-eps) pc("Ouch ");
  if(fabs(d - 1.)< eps) {pc("Bing "); ++nc;}}
printf("%d neighbors\n", nc);
return 0;}

There are more at distance 1 from origin at least according to M. Leech. What is the group of this lattice while holding the origin fixed? Any set of n neighbors that touch each other by pairs serve as a coordinate system with the same metric tensor. The transformation matrix should consist solely of integers.

This relates to String theory?

See this.