Critical bug fixed #2, add scale

added scale of polygon, corrected behavior of point on borderline case