r/programming • u/norwegianwood • Dec 24 '08
Be the first to implement this published O(n) algorithm for triangulating a simple polygon
/r/programming/comments/7lga7/softwaregenerated_paper_accepted_at_ieee/3u7k
46
Upvotes
7
u/makhno Dec 24 '08
I was all excited to implement the algorithm, then I realized I would have to fucking BUY the paper. Lame.
3
u/norwegianwood Dec 27 '08
I've just discovered that according to Skiena (1997) The Algorithm Design Manual., "this algorithm is quite hopeless to implement."
7
u/brelind Dec 24 '08
Sriously, O(n * log log n) algos have been known for a long time. For any practical purposes it's just as good as O(n). Even if you have a billion-vertex polygon, log(log(n)) = 0.954.
3
u/[deleted] Dec 25 '08 edited Dec 25 '08
Simple ear clipping. If implemented correctly it is O(n * log(n)).
Edit: Cleaning up comment.