Answer the question
In order to leave comments, you need to log in
How to randomly place objects in a plane?
Task: randomly place objects in a plane (space), so that they do not intersect.
Objects of various sizes. tell me how it can be done? Are there any algorithms?
Answer the question
In order to leave comments, you need to log in
If you have a risk that due to the high density of filling it is a problem to fit all the objects, then this is a "3D bin packing problem". The task is NP-complete, there are many materials on its solutions - mostly heuristics.
There are loads of ideas here .
After tight packing (when the first part of the "put everything" problem is solved) you can "pull" the objects randomly to make them random.
It is possible, roughly speaking, to inscribe these objects in a square (cube) and thus place, check the intersections of such objects simply.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question