This tests whether a point is inside a polygon. Click and drag the points. If the point is green, it is inside. If the point is red, it is outside.
Code in brain object.