I wonder if someone can help me to find the area of a 2-D object in Cartesian plane , when we know coordinates of every points. Eg : I want to calculate the area of a triangular. A(12,34) B(45,89) C(25,35)开发者_开发问答
I want a common algorithm to find any 2-D object's area.
Thank you.
Here you go, uses triangulation. This was literally the top result off Google when I searched "area of polygon given set of points". Please do your research before posting.
If your object is a simple polygon, there's no need to triangulate it to compute its area. There's a simple formula that depends only on the coordinates of the vertices. See http://en.wikipedia.org/wiki/Polygon#Area_and_centroid
精彩评论