This task is devoted only to the algorithm improvement. If splitting the curve is needed to get an acceptable result, that should be done in another task.
{F2535} contains the original handcrafted algorithm included in the project since the beginning.
{F2534} contains a (failed) attempt to improve the original algorithm.