> Or, to put it another way, it’s [sampling] astonishingly slow when high accuracy is desired
Raph, did you try adaptive sampling? How does the performance compare if you sample with an upper bound on change in angle, versus regular sampling?
Also curious if you wouldn’t mind expanding on use cases that need this much accuracy. The main things I’ve had to use Bezier arc length for are graphics related, e.g. hair rendering, and in that domain you don’t need much accuracy at all.
These quadrature techniques are strictly more powerful than adaptive sampling. Part of the motivation for this blog post was to raise awareness of quadrature, as it's an excellent general method when you want to numerically approximate an integral.
One reason to compute with excess accuracy is so that you can compute partial derivatives of arclength with respect to some parameter in the inner loop of an optimizer, to drive Newton or related solving. If the estimate has significant errors, then it can throw off the outer optimization loops. Of course, this only makes sense if it's cheap to compute the inner terms; if you have to pay dearly for accuracy, then use a more robust optimizer.
Raph, did you try adaptive sampling? How does the performance compare if you sample with an upper bound on change in angle, versus regular sampling?
Also curious if you wouldn’t mind expanding on use cases that need this much accuracy. The main things I’ve had to use Bezier arc length for are graphics related, e.g. hair rendering, and in that domain you don’t need much accuracy at all.