Concavity degree of a polygon

Hello
I’m currently working on a project and I’m looking for information on calculating the concavity degree of a polygon in Grasshopper. Could anyone guide me on relevant methods or algorithms for this? I appreciate any help or resources you can provide.
Thank you!

Hello
as you didn’t gave definition, it could be something like

concavityDegree = (PolygonLength - ConvexPolygonLength)/ConvexPolygonPength

3 Likes

Thank you so much for your helpful solution; it’s exactly what I was looking for!
I have one more question: Is there a way to calculate the concavity degree based on the centerpoint position of the polygon? I would greatly appreciate any insights or guidance. Thanks again!

I think it is not a good solution as the center point (curve weight or surface weight) could be the same as the convex polygon. For Example star polygon.

But you could measure distance from points on concave polygon to convex polygon and get another metrics.

1 Like

Got it. Thank you for your help. I appreciate it.