0

I am working with planar geometric shapes, essentially a large collection of polygons, whose coordinates are stored as numerical arrays. I need to develop a generic algorithm that LINEARLY resizes a polygon (or basically any closed geometric shape) -- i.e. NOT scale it by a factor, but rather linearly enlarge (or shrink) the features by a given amount.

For example, assume a hollow rectangular polygon with "line width" of 1 cm that needs to be linearly resized by 0.1 cm. The end result would be a rectangular polygon with line width 1.2 cm.

Is there an existing python package that performs such resizing operation? Thank you for any suggestions!

Chocolate
  • 31
  • 2
  • Does "linearly resize" in your sense mean sth like "fatten"? The scenario of the rectangle describes about this. – Alfe Dec 03 '14 at 20:00
  • @Alfe, yes, "fatten" would be a way of describing what I need, although it should not be limited to hollow structures. For example, a simple filled equilateral triangle with side length of 1 cm resized by 0.1 cm will result in an equilateral triangle with side length of 1.35 cm (i.e. 1 + 2*0.1/tan(30deg)). – Chocolate Dec 03 '14 at 20:22
  • I see what you mean. And, yes, I think that task is worthy of searching for a decent library doing this. – Alfe Dec 03 '14 at 20:26

0 Answers0