Expand fill of convex polygon

前端 未结 5 1398
你的背包
你的背包 2020-12-23 23:06

I have a convex polygon P1 of N points. This polygon could be any shape or proportion (as long as it is still convex).

I need to compute an

5条回答
  •  旧巷少年郎
    2020-12-23 23:30

    Let the points of the polygon be A1, B1, C1... Now you have lines from A1 to B1, then from B1 to C1... We want to compute points A2, B2, C2 of the polygon P2.

    If you bisect angle, for example A1 B1 C1, you will have a line which goes in the direction you want. Now you can find a point B2 on it which is the appropriate distance from B1 on bisector line. Repeat this for all points of the polygon P1.

提交回复
热议问题