Creating method to_polygons