News for hackers. Stuff that matters.
Re:Closed form arc length parametrization is impossible for ... by NinjaKoala on Thursday July 18, 2024 @04:02AM (#40993490)
Numerical solutions are usually much more accurate, yes. However, especially when computing with fragment shaders for example, closed form formulas tend to be faster. But the main reason for looking into it was because i had fun doing it.
Re:Closed form arc length parametrization is impossible for ... by raphlinus on Thursday July 18, 2024 @09:49AM (#40995574)
That's a really good reason, and thanks for the writeup!

My main point is that I believe there are tons of excellent numerical techniques just waiting to be discovered. Lately I've been exploring a Chebyshev polynomial basis for the Whewell equation, and I think that'll bear fruit.

Re:Closed form arc length parametrization is impossible for ... by sfpotter on Thursday July 18, 2024 @02:48PM (#40998574)
This is a little mixed up. If you write the arc length as an elliptic integral and evaluate it using a special function library, you may just be evaluating a Chebyshev series or some rational approximation (or some piecewise combination). It may indeed be quite accurate... but that will be for a general case which may be too heavyweight (e.g. a library function which evaluates a special function for any choice of parameters to 15 digits). It might be that directly approximating the arc length if your particular curve on the fly (a smooth function!) with a Chebyshev series will be faster for the same accuracy, but now you can also reduce the accuracy to get more speed if you like. This is the sense in which numerical methods are almost guaranteed to be the superior tool for the job.