Learning Polygons