An algorithm for fitting trapezoids from irregular polygons. Fork of QuadrilateralFitter, rewritten in C.