# Area of a polygon

This is a discussion on Area of a polygon within the C Programming forums, part of the General Programming Boards category; I have some x and y coordinates that make a convex polygon. I need to connect 2 of these coordinates ...

1. ## Area of a polygon

I have some x and y coordinates that make a convex polygon. I need to connect 2 of these coordinates such that they cut the polygon into 2 new polygons and the respective areas of these 2 polygons formed have the smallest difference possible ...

I have managed to write an algorithm that calculates the whole area of the original polygon (without using the triangulation method) but I don't know if that helps and moreover I don't know how to proceed.

Does anyone have any idea what's the next step or what's the algorithm I should use?

2. Well if you can already calculate the area of one polygon, how hard can it be just to call the same function twice (with the two sub-polygons) and compare the answers.

My idea is you draw say a 5-sided polygon on paper, and figure out how you incrementally start at point 1, then pick points 2,3,4,5 as potential target points for the split, and see what shapes you come up with.

The rest is rinse and repeat.