add function to judge a simple polygon