qwertie / ecsharp

Home of LoycCore, the LES language of Loyc trees, the Enhanced C# parser, the LeMP macro preprocessor, and the LLLPG parser generator.
http://ecsharp.net
Other
177 stars 25 forks source link

Is it possible to modify the ComputeConvexHull simplification power ? #70

Closed zerlas closed 5 years ago

zerlas commented 5 years ago

in this file : /Core/Loyc.Math/Geometry/PointMathTT.cs , the ComputeConvexHull(List points, bool sortInPlace) make the right job for me BUT he's too strong.

I need something who can do the same but who can let more point at the end, for example i'll give 20 000 point and he give ME only 33 in output so is it possible to change options to let him output more points ?

i'm sorry for my english

qwertie commented 5 years ago

A convex hull should have a specific number of points. If the algorithm returns more (or less) than the correct number of points, it contains a bug.

The correct number of points depends on the input. For example, if the 20 000 points are arranged in a circle, the convex hull algorithm will return all 20 000 points. If the points are arranged in a different way, it could be that the convex hull has only 3 points.