04: Clip polygons
This section will cover clipping polygons at arbitrary planes (lines work pretty much the same way). While this isn't needed immediately, it fits best here, since we already did simple clipping with a line. We will implement it in a way, that is very generic and can be used without change (aside from one part, as we will later add more data) even in 3D (and beyond). We will later on need at least one clipping plane for the full 3D rasterization to work without special cases, so it will be nice to have this already sorted out.
You can find the full rasterization code here: Rasterizer 04