public static boolean isInsidePolygon(Vector2D[] verts, double x0, double y0){
		  boolean oddNodes = false;
		  for (int i = 0, j = verts.length - 1; i < verts.length; j = i, i++) {
			  Vector2D vi = verts[i];
			  Vector2D vj = verts[j];
		    if ((vi.y < y0 && vj.y >= y0 || vj.y < y0 && vi.y >= y0) && (vi.x + (y0 - vi.y) / (vj.y - vi.y) * (vj.x - vi.x) < x0))
		      oddNodes = !oddNodes;
		  }
		  return oddNodes;
	}