sat collision detection and polygon triangulation