Tag Archives: inside polygon

Use a GraphicsPath to determine whether a point lies inside a polygon in C#

The example Determine whether a point is inside a polygon in C# shows a mathematical technique for telling if a point lies inside a polygon. This example uses .NET’s GraphicsPath class to do the same thing. The following PointIsInPolygon method … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , | 3 Comments

Determine whether a point is inside a polygon in C#

One way to determine whether a point lies within a polygon is to add up the angles between the point and adjacent points on the polygon taken in order. For example, if the point in question is P and points … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , | 15 Comments