Here's my problem: I need to fit rectangles in a polygon but in "certain way".
I have few rectangular shapes (of different sizes) and I need to put them on a polygon.
My first idea was to always try to put them on the top right of the previously placed shape, and if it is not possible, on the bottom left angle of the previously placed shape. It works but it does not looks great, since it does not take into account the placement of the previously placed shape (sometimes the last placed shape is not the most logical).
From this, I imagine we could have a kind of "navmesh": when a shape is placed, it says that nothing more can be placed here and that it needs to find a better place.
... with enough space to welcome a new rectangular shape that could possible fit on the blank space.
So... what I want is to place my shapes on the far top and then on the far left.
Do you guys have any ideas how to do this? Maybe this kind of algorithm already exists and I don't know the name?