concavity is a relative measure of concavity. 1 results in a relatively detailed shape, Infinity results in a convex hull.
You can use values lower than 1, but they can produce pretty crazy shapes.
lengthThreshold: when a segment length is under this threshold, it stops being considered for further detalization.
Higher values result in simpler shapes.
This implementation dramatically improves performance over the one stated in the paper
(O(rn), where r is a number of output points, to O(n log n))
by introducing a fast k nearest points to a segment algorithm,
a modification of a depth-first kNN R-tree search using a priority queue.
In 2019, a C++ port has been created, allowing for efficient usage from C/C++, Python (via cffi) and other languages featuring an FFI and/or plug-in mechanism for C (e.g. a MATLAB MEX file should be easy to prepare).