4 ms·
Numerical solutions are usually much more accurate, yes. However, especially when computing with fragment shaders for example, closed form formulas tend to be f
by NinjaKoala 2y ago
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.
- raphlinus 2y agoThat'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.
- deleted 2y ago[deleted]
- sfpotter 2y agoThis 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.