Click or drag to resize

MathHelperApproximatePolygon Method

Approximates (simplifies) a polygon using the Ramer–Douglas–Peucker algorithm.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.12.2
Syntax
public static List<Vector2> ApproximatePolygon(
	List<Vector2> points,
	double tolerance
)

Parameters

points
Type: System.Collections.GenericListVector2
The input polygon as a list of Vector2 points.
tolerance
Type: SystemDouble
The tolerance for simplification (higher = more simplified).

Return Value

Type: ListVector2
A simplified list of Vector2 points.
See Also