C# (CSharp) AForge.Math.Geometry ClosePointsMergingOptimizer - 1개의 예제가 발견되었습니다. 이것들은 오픈소스 프로젝트에서 추출된 C# (CSharp)의 AForge.Math.Geometry.ClosePointsMergingOptimizer에 대한 실세계 최고 등급의 예제들입니다. 예제들을 평가하여 예제의 품질 향상에 도움을 줄 수 있습니다.
Shape optimizer, which merges points within close distance to each other.
This shape optimizing algorithm checks all points of a shape and merges any two points which are within specified distance to each other. Two close points are replaced by a single point, which has mean coordinates of the removed points.
Because of the fact that the algorithm performs points merging while it goes through a shape, it may merge several points (more than 2) into a single point, where distance between extreme points may be bigger than the specified limit. For example, suppose a case with 3 points, where 1st and 2nd points are close enough to be merged, but the 3rd point is a little bit further. During merging of 1st and 2nd points, it may happen that the new point with mean coordinates will get closer to the 3rd point, so they will be merged also on next iteration of the algorithm.
For example, the below circle shape comprised of 65 points, can be optimized to 8 points by setting MaxDistanceToMerge to 28.