-
Notifications
You must be signed in to change notification settings - Fork 42
Polygon Simplification
Justin edited this page Mar 11, 2022
·
6 revisions
CGAL provides the polygon simplifcation algorithm for polygons and polygons with holes.
This is provided through the PolygonSimplification2 class of which a static instance can be used as follows.
//Create a polygon.
var polygon = PolygonFactory<EIK>.KochStar(30, 3);
var param = PolygonSimplificationParams.Default;
param.threshold = 100;
param.stop = POLYGON_SIMP_STOP_FUNC.BELOW_THRESHOLD;
param.cost = POLYGON_SIMP_COST_FUNC.SQUARE_DIST;
var simplifiedPolygon = instance.Simplify(polygon, Param);
Below is a image of the kock start being simplifed.