Fence problem

Hi, i have a Collection of points and need to draw a polygon (this polygon can be concave).
The problem is: I don´t know if the point “surrounds” the polygon.

Is it an usual problem?

I´ve found the solution to the convex polygon --> “Convex Hull”

Henrique Spindola

I don’t think I understand what you’re saying.

Guess: do you need an algorithm to determine whether or not an arbitrary polygon contains a specified point? Then the Polygon class of java2D has a contains() method which should do exactly what you want.