You are here: Start » AVL.NET » AVL.RegionConvexity(AvlNet.Region, float)
AVL.RegionConvexity(AvlNet.Region, float)
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void RegionConvexity( AvlNet.Region inRegion, out float outConvexity )
Parameters
- inRegion
- Type: AvlNet.Region
- outConvexity
- Type: System.Single
Description
Convexity is a measure of how close a region is to being convex. Convex regions have convexity equal to 1.0, while the more concave the region is, the closer to 0.0 is its convexity.
Mathematically, the convexity is calculated as follows: 
Examples
![]() |
![]() |
Area of the sample region (on the left) equals to 2345, while area of its convex hull (on the right) equals to 40357, so the RegionConvexity run on the sample region would produce the result 2345/40357 = 0.058 .
Errors
| Error type | Description |
|---|---|
| DomainError | Degenerate region on input in RegionConvexity. |


