18. Polygon area

Write a program that lets the user left-click to add points to a polygon. When the user right-clicks, close the polygon and calculate its area.

Hint: Consider the trapezoids defined by the polygon's edges, the X axis, and sides dropped vertically from the polygon's vertices to the X axis.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.47.218