I want to know how to put a small figure into a square or other figure. The location of the small figure is not important. It can go to the corner or it can be located in the center. However, objects should not be deformed. To get into a large figure, you just have to turn, move, or flip the object. Also, small figures should not protrude out of the large figure. What can I do with the grasshopper?
You have 3 options:
- Find some working shape packing algo/solution and put small things into a container.
- Recursively move the small around until no ccx events occur (that’s a bit naive and time consuming).
- Pixelate (LOL) the small and the big (using the same size “pixels/voxels”) and use classic Matrix related ops to find cells in the big that have the same “layout/pattern” as the cells in the small. For instance this is using a random density (user controlled) Matrix of ones and attempts to locate a given search pattern:
Thank you for your answer.
Your answer inspired me again.^o^