I want to estimate the maximum number of smaller spheres (of known constant radius, r) that can closely pack around a bigger sphere (of radius R, providing R >= r). It would be much appreciated if someone shows me how to get the number (and a 3D plot) for few different radii to generalize (i.e. for both r and R values).

  • 3
    $\begingroup$ This is not really a problem with Mathematica, but rather a math/geometry problem first. When you come up with a solution to the underlying problem, we can then help you implement it in Mathematica. See for instance: mathworld.wolfram.com/SphericalCode.html $\endgroup$ – MarcoB Dec 6 '15 at 18:38
  • $\begingroup$ Isn't it simply the ratio $\frac{4\pi R^2}{\pi r^2}$ $\endgroup$ – Hubble07 Dec 6 '15 at 18:40
  • $\begingroup$ Hi Hubble07, Thanks for your quick response! However, I don't think this is that simple problem: My question is related to close-packing of spheres without overlapping. Please, check your equation, assuming r = R (for equal radii, the simplest case!), which would give 4 spheres around one (and that is not true; and rather it should accommodate 12 number of spheres in a close pack). At the same time, the general expression, i.e. if r<R, would be a great help for me. $\endgroup$ – user36159 Dec 6 '15 at 19:03
  • 1
    $\begingroup$ @Hubble07 Your answer is simply incorrect. It would be correct only in the case that each sphere was infinitely deformable (i.e., equivalent to fluid volume) where you pour the volume of $n$ smaller spheres into the volume of the larger sphere. The proven answer are here: en.wikipedia.org/wiki/Sphere_packing_in_a_sphere. $\endgroup$ – David G. Stork Dec 6 '15 at 21:40
  • $\begingroup$ note the question regards packing around a sphere, not inside. $\endgroup$ – george2079 Dec 7 '15 at 18:40

Your question seems similar to the problem of equispaced points on a sphere. The following code enables an estimate of radius r of n small surrounding spheres, assuming the equispaced points are the tangent points of the small spheres.

A number n of random initial points on a sphere of radius r, which is big R in your question.

InitialPoints[n_Integer, r_] :=
   Map[r {Sin[#[[1]]] Cos[#[[2]]], Sin[#[[1]]] Sin[#[[2]]], Cos[#[[1]]]} &, 
      Map[{ArcCos[2.*#[[1]] - 1.], 2.0*Pi*#[[2]]} &, RandomReal[{0.,1.}, {n, 2}]]]

A perturbation of a point's position due to replusive "forces" from all other points.

PerturbPoint[p1_, p_List, r_, e_: 0.01] := 
      p1 + e*Total[Map[If[p1 == #, 0, (p1 - #)/Norm[p1 - #]^3]&, p]]]

Perturb all points.

PerturbPoints[p_List, r_, e_: 0.01] := Map[PerturbPoint[#, p, r, e] &, p]

Find the final positions of all points.

PointRelax[p_List, r_, e_] := FixedPoint[PerturbPoints[#, r, e] &, p, 100000]

For example, the following approximate solution took about a minute for n=20 spheres.

AbsoluteTiming[p20 = PointRelax[InitialPoints[20, 1], 1, 0.01]]

Using this Manipulate suggests r=0.7 is approximately correct for n=20.

      {Cyan, Opacity[0.6], Sphere[{0, 0, 0}, 1]},
      {Darker[Red], Map[Sphere[#, r] &, (1 + r)*p20]}},
      Boxed -> False, Background -> Black, SphericalRegion -> True],
   {{r, 0.3}, 0.05, 1.5, Appearance -> "Labeled"}]

spheres on sphere

Another run showed that for n=10, the radius is approximately r=1.3.

  • $\begingroup$ Many thanks, Kenny Colnago! This is perfect to visualize the densest close-pack for the given number of spheres (onto another sphere) as a function of their radii. However, as a beginner, I could not use your approximation to estimate the number of spheres (of given/smaller radius, r) that are required to form a close-pack (onto the given/bigger radius R, providing R> r). Any help to estimate (and demonstrate) the number of spheres (1 or 2 different radii, for e.g.) to form a close-pack (onto a bigger sphere of fixed R) would be great help for me. Thanks! $\endgroup$ – user36159 Dec 7 '15 at 2:03
  • $\begingroup$ I have no analytic solution to your problem, but was suggesting that you run the code for many values of n, and use the manipulate to find an approximate r for each n. Then plot values of n on the vertical axis and r on the horizontal axis. Fit a line or function to give an empirical function which returns n, given r. $\endgroup$ – KennyColnago Dec 8 '15 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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