问题
I have a polygon that consists of points (x,y). What I woul like to do is to reduce this by a percentage. Keep in mind: I dont want to just scale it. The polygon should get a kind of inner border (its width depends on the percentage) that gets cut off the polygon.
Who knows an algorithm that can achieve that?
Input: Array of Points, Percentage
Output: Array of Points
回答1:
What you seek is the offset polygon. It is not easy to compute, but it has been quite well-studied. Perhaps the answer to this earlier question could help: Shrink polygon to a specific area by offsetting.

来源:https://stackoverflow.com/questions/45727683/reduce-polygon-area-by-percentage