title: Compute the area of intersection between a circle and a triangle?
body: <p>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 work, not school.  :)</p>
  
  <p>It would look something like this in C#:</p>
  
  <pre><code>struct { PointF vert[3]; } Triangle;
  struct { PointF center; float radius; } Circle;
  
  // returns the area of intersection, e.g.:
  // if the circle contains the triangle, return area of triangle
  // if the triangle contains the circle, return area of circle
  // if partial intersection, figure that out
  // if no intersection, return 0
  double AreaOfIntersection(Triangle t, Circle c)
  {
   ...
  }
  </code></pre>