How to fill a object with block instances

Hello all,
I am looking for a script (or command) that can “fill” a 3d polysurface with a group of block instances, so that the block instances do not intersect. For example, say I have a large basket, and a block instance “baseball,” I want to fill the basket with baseballs so that they completely populate the interior of the basket without intersecting each other or the basket itself (just as they would in real life).
Is there anyway to do this??

The only way I have found to do this is to use the squish command and a series of surface offsets, yet this is a very tedious process and produces many intersects.

Rhino doesn’t have a default rigid body physics simulator… although there is the Kangaroo add-on for Grasshopper and I believe another plugin called RhinoPhysX which I haven’t tried. You can also calculate the collision in a polygonal modeler with a physics engine and then bring over the result to Rhino as an Obj file.

Thanks for your response brian, do you know of a tutorial that illustrates
how to do this with grasshopper+kangaroo? I have am not very familiar with
grasshopper but I want to give it a shot.

Actually if anyone is familiar with RhinoPhysX, I am thinking of installing
it, does anyone know how to do this what that plugin?

I found this post from Oct. '14 which might help a little with the set up using Kangaroo. It also looks like rigid body sim is being worked on for future versions so it may not be suited to what you need yet. Again, I would just do this in a poly modeler with a physics simulator and then export the objects back to Rhino… Blender is a good choice for this in my opinion.

Hey Brian,
I think I will take your advice and go ahead and download blender, do you know if there is a tutorial on how to do this? Should I make the shape in rhino first and then export it into blender, then fill it with the items?