A polygon is a closed n-sided figure composed of n straight line segments, joined end to end. The point at which two sides join is called a vertex. For example, a triangle is a three-sided polygon, and a rectangle is a four-sided polygon. Using recursion, compute the area of a polygon. If you cut off a triangle, compute its area, and sum these areas as you repeat the process, you eventually will get the area of the polygon. Note that a triangle whose vertices are at the coordinates (x1, y1), (x2, y2), and (x3, y3) has an area equal to (x1 x y2 + x2 x y3 + x3 x y1 – x1 x y3 – x2 x y1 – x3 x y2) / 2
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here