Check if the specified set of points form a convex polygon shape.

Namespace:  AForge.Math.Geometry
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public bool IsConvexPolygon(
	List<IntPoint> edgePoints,
	out List<IntPoint> corners
)

Parameters

edgePoints
Type: System.Collections.Generic..::.List<(Of <(IntPoint>)>)
Shape's points to check.
corners
Type: System.Collections.Generic..::.List<(Of <(IntPoint>)>) %
List of polygon corners on successful return.

Return Value

Returns trueTruetruetrue (True in Visual Basic) if the specified set of points form a convex polygon shape or falseFalsefalsefalse (False in Visual Basic) otherwise.

Remarks

Note:The method is able to detect only triangles and quadrilaterals for now. Check number of detected corners to resolve type of the detected polygon.

See Also