create a component to draw a polygon