triangulates a 2D polyline into a stroke