Compute the area of intersection between a circle and a triangle?

后端 未结 11 1068
礼貌的吻别
礼貌的吻别 2020-12-02 17:38

How does one compute the area of intersection between a triangle (specified as three (X,Y) pairs) and a circle (X,Y,R)? I\'ve done some searching to no avail. This is for

11条回答
  •  感动是毒
    2020-12-02 18:17

    I'm almost a year and a half late, but I thought maybe people will be interested in code here that I wrote which I think does this correctly. Look in function IntersectionArea near the bottom. The general approach is to pick off the convex polygon circumscribed by the circle, and then deal with the little circular caps.

提交回复
热议问题