0

I am looking for the help with finding the most efficient algorithm to solve this problem. I have a set of overlapping rectangles (possibly unlimited number of them). Every rectangle is defined by four points in X,Y axis.

I would like to get all extreme points of their convex hull.

The problem is that the result should be non-convex polygon as it shows example below.

This example shows three overlapping rectangles:

example

klutt
  • 30,332
  • 17
  • 55
  • 95
gron
  • 11
  • 2
    It doesn't make sense to ask for a convex hull that isn't convex. I would describe what you want as the outline of a union of rectangles. – Matt Timmermans Nov 14 '21 at 18:14
  • I doubt you will find a solution for a `possibly unlimited` size of input. How is this input even going to be provided? Do you expect an online algorithm that works over a stream of rectangles? – Ivaylo Strandjev Nov 16 '21 at 09:20
  • When I said "possibly unlimited" I meant that sometime the input can be 100 rectangles and sometime 1000 rectangles but always predefined number. – gron Nov 16 '21 at 12:52

0 Answers0