Splitting an arbitrary polygon by a line
Source code to split an arbitrary concave polygon by a line, accompanying a post on my blog (visit http://geidav.wordpress.com). The code is written in C++(11) using the STL and Qt5. It should be straightforward to port it to any other language. This code is just to illustrate how the algorithm works. It's by no means optimized.