Listing 2 Part 2 of the clipping algorithm, closes the output polygon

enter to close
IF the line between LastPoint and FirstPoint
             intersects edge THEN
       output the intersection point
ENDIF

/* End Of File */