@J.M. Well, I'm thinking in order to do this rigorously, you need to show that given a list of ordered pairs of real numbers, where the first and last element of the list are the same, the set of points lying on the line between them lies in the inside of the polygon. But I'm not sure how to stipulate "non-selfintersecting polygon" or formula an "interiorness" condition in coordinate geometry