receive polygons and lines from stdin and draw them on screen