Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    

1 Answer 1

up vote 3 down vote accepted

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]]

enter image description here

For more complex polyhedra see: Checking if a point is in a convex 3D polyhedron

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.