moved polygon drawing over to the renderer
added doc comment