Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for an idea of an algorithm for the following problem:

Give an efficient algorithm to determine whether a polygon P with n vertices is monotone with respect to some line, not necessarily a horizontal or vertical one.

Monotonicity is the crucial part of Polygon Triangulation.

In my opinion the easiest algorithm is sweep plane for testing monotonicity, which is gonna take $O(nlogn)$.

Also there is linear time algorithm of Preparata, but I didn't find it.

If you have any idea of testing monotonicity or you know where to find Preparata's algorithm share it with us.


share|cite|improve this question

I have no idea how Preparata's algorithm looks like, but I think is possible to do it in linear time with almost brute force. For each two consecutive edges check the angle between them and if it is concave, you will have a constraint on the possible directions of monotonicity. If there is something left, then no vertex will cause a problem (after all you have checked every vertex for this), and if there's nothing left, you have your proof that each direction will fail.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.