Graphically Illustrated Mathematics Solutions
An irregular polygon is a polygon with n number of straight edges/sides connected to form a closed loop. The polygon can be concave or convex with or without hollow sections as shown in the Types of Irregular Polygons to the right. In an irregular polygon, none of the sides should cross any other sides. The following program allows the user to set up a canvas environment in such a way that it suites the size of the intended polygon. Each time a polygon is completely plotted, its area and centroid are worked out and shown in the results section below. As more hollow polygons are added to the main polygon, the area and centroid values are updated.
In this program there are 5 rules to observe to get the right results. These rules are:
If the centroid of the final completed polygon is required, click on Plot Centroidbutton.
Create a canvas by setting up the canvas data below or use the default values. When all data is entered, click on Create Canvas button to create a canvas.
Once the canvas is created, the user can plot a polygon coordinates using the mouse. To create a polygon, have a list of X and Y coordinates ready. Plot the polygon coordinates in a clockwise manner using the mouse left hand button. Once the last vertex is plotted right click anywhere on the canvas to draw the polygon. Repeat the same process for any hollow sections inside the first main polygon, observing the rules above. Only one main polygon is allowed per canvas.
polygons' Coordinates