Due: April 10, 2013 09:00 PM
This week you are to extend the interactive polygon builder that you did for Homework 6, to make it a full polygon editor. When the program starts up, it is in vertex entry mode, and operates exactly like your program for Homework 6. However, after the middle mouse button is clicked, the program should enter editing mode. In this mode, the user can still move vertices around using the left mouse button.
However, the user now has two additional options: deleting and inserting vertices. The user deletes a vertex by clicking on it with the right mouse button. The user inserts a new vertex by pressing the left mouse button on an edge. The new vertex is placed at the mouse position, between the vertices at the two ends of the edge. As long as the left-button is held down, the vertex can be moved. When the button is released, the vertex is frozen.
The polygon should be continuously updated on screen as vertices are entered, deleted, and/or moved. The window File menu "quit" option should be used to end the program.