Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • $\begingroup$ Interesting problem. Could you explain the context of the problem? Just curiosity? $\endgroup$ Commented Oct 12, 2012 at 1:37
  • $\begingroup$ How many spheres? $\endgroup$ Commented Oct 12, 2012 at 1:38
  • $\begingroup$ I'm trying to solve a packing density problem with mathematica. Eventually, I want to fill the cube to a volume fraction of 1/3 of the spheres. Right now I'm struggling to plot the cube and hard spheres. $\endgroup$ Commented Oct 12, 2012 at 1:43
  • $\begingroup$ So you are just trying to plot right now? You can do cube = {Opacity[.3], Cuboid[{0, 0, 0}, {20, 20, 20}]}; spheres = Table[{Black, Sphere[RandomReal[{.35, 20 - .35}, 3], .7]}, {j, 1, 10}]; Graphics3D[{cube, spheres}] $\endgroup$ Commented Oct 12, 2012 at 1:54
  • $\begingroup$ It's easier to pack them than to place them randomly, especially if you want to assume that they cannot sit still, suspended by the air. $\endgroup$ Commented Oct 12, 2012 at 5:44