Area of a irregular shape

后端 未结 7 1684
挽巷
挽巷 2021-02-06 05:09

I have set of points which lies on the image. These set of points form a irregular closed shape. I need to find the area of this shape. Does any body which is the normal algorit

7条回答
  •  佛祖请我去吃肉
    2021-02-06 05:54

    There is support for area calculation of polygons in Boost.Geometry (which isn't yet accepted into boost and which is very confusing to use). Otherwise you would have to determine the polygon that is defined by your points first. From the looks of it all of your points are vertices of the polygon so this is a simply a matter of ordering your point sets correctly. Another possibility is that you are looking for the convex hull of your point set (see http://en.wikipedia.org/wiki/Convex_hull_algorithms).

提交回复
热议问题