Hacker News new | ask | show | jobs
The Weiler-Atherton polygon clipping algorithm (liorsinai.github.io)
28 points by the_origami_fox 974 days ago
1 comments

The author links to another blog discussing the related Martinez-Rueda algorithm, which I mention not only because this post ends with "I am considering implementing the Martinez-Rueda algorithm because [... it is more featureful]", but because at the top of it[1] there's a "visual proof" of sorts that I found strikingly concise.

[1]: https://sean.cm/a/polygon-clipping-pt2#annotating-segments

The sweeping line algorithm with a priority queue is what's used internally by the GLU Tessellator[1].

[1] https://www.glprogramming.com/red/chapter11.html