code: private boolean onPath(Shape path, float x, float y) {
  		for (int i=0;i<path.getPointCount()+1;i++) {
  			int n = rationalPoint(path, i+1);
  			Line line = getLine(path, rationalPoint(path, i), n);
  			if (line.distance(new Vector2f(x,y)) < EPSILON*100) {
  				return true;
  			}
  		}
  		
  		return false;
  	}
docs: Check if the given point is on the path
  
  @param path The path to check
  @param x The x coordinate of the point to check
  @param y The y coordiante of teh point to check
  @return True if the point is on the path