I have a parameterized 2D curve:
(x,y) = f(t)
The function f is arbitrary but differentiable and hence I can figure out the differential arc length ds along the curve at any point using standard formulas. I can also get the total arc length S(t) from the beginning to any point on the curve by integrating the differential arc length formula numerically. I can control the accuracy of the calculation.
I want to find locate the point (x,y) that has a total arc length S = D from the beginning of the curve. Even better if the implementation were in python. I will be doing this many times, and it is part of a computational application where I need tight control of accuracy and some confidence of convergence.
I don’t know if root finding is the best approach, but my question is the equivalent of a root finding problem for g(t) = S(t) – D where the function g(t) is not evaluated exactly because S(t) isn’t. Inexact function evaluation messes not only with accuracy but also the monotonicity of g(t). I tried doing tight numerical integration from the outset but it takes forever. I’m pretty sure to converge to my required tolerance the root finding algorithm would have to lazily control the integration accuracy as it proceeded, demanding sloppy evaluation at the outset and increasing accuracy as the root algorithm converges.
Is there such a thing readily available? Is there an alternative clever way to do it?
Appreciate the help
Can you post some code, and tell us what’s wrong with it?
Here is my version that calculate the t where S(t) == D: