I am looking to draw a container of solid ellipsoids in MATLAB, to represent a box of peanuts.
The physical constraints of the problem include:
- the 3D container (approximately 1 square foot area for the "base," a few inches deep)
- the size of the peanut, using three radius dimensions for the peanut, each randomly selected from a normal distribution
- peanuts must not overlap or have touching borders
- peanuts must be inside the dimensions of the container
I've been looking around for several months now on how to solve this problem efficiently to no avail. It seems the closest I can get is this:
Update on: How to model random non-overlapping spheres of non-uniform size in a cube using Matlab?
but I'm not sure if I understand how to execute the code or what units any of the inputs are in (maybe they're nondimensional?).
I have a working proficiency in MATLAB, but I need someone to break down the problem for me as if you were explaining it to someone who has no experience coding. I'm open to using a different code if there is something that might be more appropriate to the problem at hand.
Aucun commentaire:
Enregistrer un commentaire