remove recursive call from PolygonTraversal
do some optimization. but still slow on PolygonTraversal