开发者

Calculate area of a object in cartesian plane

开发者 https://www.devze.com 2023-03-07 12:35 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消