获取线圆交点的面积

Getting area of a line circle intersection

我有一个圆,我有两条平行线直接穿过它(总是有 2 个交叉点)。 圆的半径是500,也就是说它的面积是500 * 500 * pi.

Quick paint image 上面的例子。红色区域是我要计算的重叠区域。但是我不确定如何,这是我目前拥有的:

const float radius = 500.0f;
float area = (radius * radius) * PI;

Vector3 intersect1, intersect2;  
if (CircleLineIntersection(center, point1, point2, radius, &intersect1, &intersect2) == 2) {
   ...

   float remainingArea = area - ...;
}

那么我应该如何计算红色区域(或两个绿色区域)?

计算绿色面积,从圆的面积中减去它。

https://en.wikipedia.org/wiki/Circular_segment