refactored polygon.get() code to Calipers code