ear-clipping triangulation (thanks to Firoball for the hint to that algorithm):