I have a large sphere of radius $R_1$ which I would like to pack with $N$ smaller radius of radius $r_2<R_1$ arranged in a face-centered cubic (fcc) packing arrangement (i.e. Kepler's optimal sphere packing geometry). Is there a way for me to use Mathematica's built-in LatticeData functionality to accomplish this, perhaps with an after-the-fact pruning step? Can I do this for the other lattice types Mathematica has data for?
-
$\begingroup$ Related: Can a LatticeData image be displayed in a space filled fashion $\endgroup$– JensMay 28, 2013 at 22:49
1 Answer
This should get you started...
basis = LatticeData["FaceCenteredCubic", "Basis"];
points = Tuples[Range[-4, 4], 3].basis;
inside = Select[points, Norm[#] <= 4 &];
Graphics3D[Sphere[inside, 0.25]]
For more complex polyhedra see: Checking if a point is in a convex 3D polyhedron