Quote:
Minimizing the area requirement by placing different polygon
This look like a 2D cutting stock problem, a problem very common in industry, but the problem is complicated enough to have companies selling specialized products for this problem. So don't expect a simple solution to fit in a couple hundred lines of code.
Cutting stock problem - Wikipedia[
^]
In the 2D cutting stock problem, squares and rectangles are the easiest to deal with, after that, convex polygon are next, and then concave polygons are the hardest.
Not all programs can deal with every polygon, so first you need to be precise with the kind of polygons you have to deal with.
You need to give more details to give us an idea of your real problem.