Tag Archives: point 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

Perform geometric operations on polygons in C#

This example contains a Polygon class that perform several useful geometric operations for polygons. The following list describes the key methods provided by the class. Click the links to see posts that describe the methods in greater detail. PolygonIsConvex – … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

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