Finding free non-intersecting rectangle shaped areas between rectangles in C# -
I have the following problem: A large rectangle contains small non-intersecting rectangles (black rectangles in the picture below) and me To fill the remaining free area, there is a need to find an algorithm, which is with no piercing rectangles (red color in the picture below). There is no problem with speed algorithm. Also if I have an example source code for an algorithm, then I really appreciate it.
Edit Small explanations I need to get the coordinates of red rectangles do not attract them. I am not working with point data too.
Most bin-packing problems like this for me as a NP-hard problem Looks 2, with rectangles, there are 8! (= 40320) Possible arrangements you need to consider. Three rectangles produce 12! Possibilities, 480 million cool.
You will need to make an estimate to make this calculable. In favor of the outer edges of the rectangles near the boundary rectangular, I do not like the results you will need hard requirements on the resulting rectangles, many of them are not helping, it is not my problem :)
Comments
Post a Comment