I have two overlapping shapes in my C # application defined by arrays Point. I need to find the points that define the shape where the two overlap. In this image, I know the red and green dots, but I need the yellow dots.

Here is some dummy code that might help:
Point[] GetIntersection(Point[] red, Point[] green)
{
Point[] yellow = ?!?;
return yellow;
}
Of course, you can do this by accepting nice simple rectangles. In practice, I need to be able to handle polygons and possibly even circles (although I can live without circles).
Any ideas? I hope there is a great GDI + feature that just spits it out.
Jon b source
share