Skip to main content
Open

Find Largest Internal Rectangle from a Polygon

Related products:Transformers
  • October 14, 2019
  • 3 replies
  • 81 views

milo89
Enthusiast
Forum|alt.badge.img+26

Looking for a transformer to establishing the largest rectangle that would fit inside a given polygon. The mathematics behind it is extremely complex, though would be happy if it only worked with convex polygons to simply things.

This idea isn't exactly new.
Previously raised in a few questions:
2015 - https://knowledge.safe.com/questions/4879/maximal-rectangle.html
2018 - https://knowledge.safe.com/questions/65011/maximum-inside-rectangle-from-an-polygon.html

However, I don't believe it has been raised as an idea yet.

3 replies

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • October 15, 2019

milo89
Enthusiast
Forum|alt.badge.img+26
  • Author
  • Enthusiast
  • October 20, 2019

Thanks @jdh

I've seen that article and the code that has been used. I'm not sure if my implementation is correct but I've found instances where rectangles provided could potentially be extended further and still fit within the polygon.


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • October 21, 2019

Your implementation is probably correct. The algorithm is an approximation, and doesn't guarantee the largest possible polygon, just one that is close to it.