Implemented a polygon component and wrote a test application