Find point in polygon
<p>I have a simple, 2 dimensional polygon with vertices 3..n. I need to find an arbitrary point in the interior (not on the boundary) of this polygon. How can I find one?
This problem is trivial for convex polygons: Just take three adjacent points that are not lying on the same line (so they are forming a triangle). The midpoint of this triangle is guaranteed to lie inside the polygon. But this approach does not work for non-convex polygons.</p>

<pre><code>   class Point
   {
      public double X, Y;
   }

   Point GetPointInPolygon(Point[] polygon)
   {
      .....
   }
</code></pre>