Algorithm for fitting 2D polygons in an area?

旧街凉风 提交于 2019-12-05 15:54:10

One possible name is a Packing Problem. It is related to the Knapsack Problem. These problems tend to be NP-hard, and many require heuristics. If you can constrain the allowed forms of polygons and of the area, there may exist a more efficient algorithm for your special case.

You can have a look at "Dancing Links" in Wikipedia for Donald Knuth's solution to the exact cover problem - which includes tiling - your question can be looked at as a tiling problem

High Performance Mark

IF (that's a big if) all your polygons were rectangles, and the area into which they are to fit is also a rectangle, then this would be called bin-packing, Google will overwhelm you with information about this. If they're not then I guess that you are looking for a variant of bin-packing, and I guess some more that you are into an NP problem for which 'try and test' is about the best algorithm around.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!