Compute boundary polygons