algorithm - How to approximate a polygon with n rectangles? -


is there algorithm can approximate given polygon n non overlapping rectangles gives maximum coverage? maximum coverage mean, sum of rectangle areas maximized. rectangles not equal sized.

the polygons dealing convex. if exact solution hard/expensive find (which expecting be), simple heuristics welcome too.

edit thought of approximating polygon rectangles inside polygon, solutions rectangles not totally inside polygons fine. if case, maximization of area becomes minimization of area.

edit 2 forgot mention these rectangles orthogonal rectangles, i.e. aligned axises.

one approach create (in general case rectangular) bounding box polygon. calculate difference between area of bounding box , area of polygon. if difference small enough, you're done, if not, continue ...

divide box 4 equal-sized rectangles, 2x2. figure out of these rectangles entirely inside polygon. calculate difference between total area of rectangles inside polygon , of polygon. if difference small enough you're done, if not continue ...

divide each of 4 rectangles 4 sub-rectangles ... if @ stage find rectangle either inside or outside polygon can remove list of rectangles subdivide @ next iteration.

in other words, use quadtree divide space containing polygon , develop extent necessary meet accuracy criteria.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -