MathHelperApproximatePolygon Method
|
Approximates (simplifies) a polygon using the Ramer–Douglas–Peucker algorithm.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.12.2
Syntaxpublic static List<Vector2> ApproximatePolygon(
List<Vector2> points,
double tolerance
)
Public Shared Function ApproximatePolygon (
points As List(Of Vector2),
tolerance As Double
) As List(Of Vector2)
public:
static List<Vector2>^ ApproximatePolygon(
List<Vector2>^ points,
double tolerance
)
static member ApproximatePolygon :
points : List<Vector2> *
tolerance : float -> List<Vector2>
STATIC METHOD ApproximatePolygon(
points AS List<Vector2>,
tolerance AS REAL8
) AS List<Vector2>
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:
ListVector2A simplified list of Vector2 points.
See Also